0% found this document useful (0 votes)
20 views10 pages

Binary and Hexadecimal

The document explains binary and hexadecimal systems, highlighting their importance in computer programming and data representation. It covers the basics of binary code, character sets like ASCII and Unicode, and arithmetic operations in binary. Additionally, it discusses the concept of binary shifts and their mathematical implications.

Uploaded by

b3djamas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views10 pages

Binary and Hexadecimal

The document explains binary and hexadecimal systems, highlighting their importance in computer programming and data representation. It covers the basics of binary code, character sets like ASCII and Unicode, and arithmetic operations in binary. Additionally, it discusses the concept of binary shifts and their mathematical implications.

Uploaded by

b3djamas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Binary and

Hexadecimal
Veanisha Baskaran
GCSE
Friday 06th September 2024

Binary
• ON=1 OFF=0
• Computers only understand switches
• Screens are made of LED pixels
• More pixels = Higher resolution
• Software –app(lications)s, program, executables
• File extensions - .jpg , .exe , .docx
• Computers can only understand binary or machine code

Machine code is used by computers to understand our programming language, which is consisted of
only numbers. This is almost impossible for humans to understand this.

Low-level language = machine code


High-level language = Code that is closer to our language eg; python
Wednesday 11th September 2024

128 64 32 16 8 4 2 1
1.128 + 64 + 16=208 1 1 0 1 0 0 0 0
2. 64+ 16 + 1= 81 0 1 0 0 1 0 0 1
3.128 +1 = 129
4.251 1 0 0 0 0 0 0 1
5.255 1 1 1 1 1 0 1 1
1 1 1 1 1 1 1 1

128 64 32 16 8 4 2 1
-each column is a bit 1 0 1 1 0 0 0 0
- 8 bits make up 1 byte.
-nibbles = 4 bits 1 0 1 0 1 0 1 0
-each bit goes from 1 to 8 1 1 1 1 0 0 0 0
1 1 0 0 1 1 0 0
0 0 0 0 0 1 1 1
De 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

He 0 1 2 3 4 5 6 7 8 9 A B C D E F

-Computers also use Hexadecimal numbers IF binary number is 01101010(106), split it in


-There are 16 hexadecimal numbers half:

For example, if you had 256: 0110 1010

-flip number:652 Convert into denary


-times each number by increasing power of 16
6 x 160 = 6 x 1 = 6
5 x 161 = 5 x 16 = 80 6 10
2 x 162 = 2 x 256 = 512
Convert into hexadecimal
-Add results together
6 + 80 + 512 = 598
6 A
Thursday 12th September 2024
Character Sets
• Data and information are similar however data is information without context

• Text is, for example is represented using character sets

• Concatenation = when two strings are put together

• Character sets are letters that have numerical codes to represent it


ASCII☺☺☺☺☺

• The original ASCII only uses 7-bit numbers to represent letters , numbers and
punctuation used in the English language.

• Upper case letters (capitals) have different values to lowercase characters.

• Punctuation symbols have their own characters

• There are 2 possibilities of sets

• 27 = 128 possible values from 0 to 127 (this includes 0 as a character representative)

• Each of those values are assigned to a character


Friday 13th September 2024

Do Now

1. What is the ASCII character for the number 7?


00110111

2. Is this the same as the binary value of 7?


No, binary = 00000111

3. Why not? What is happening? What does this mean?


When you write a program in Python, for example you have to specify whether a
variable is text or integer
• Extended ASCII uses 8 bits
• Because ASCII has an extra unused bit, it could store another 128 values
• This is useful for other languages that may use the initial ASCII characters, but
might need other characters.
• IF you wanted to store a Polish string for example, you can use the extra bit to
store other characters

• Unicode is another character set that can store up to 32 bits.


• This set allows character representation for other languages such as Chinese,
Punjabi, Greek and other writing sets and symbols.
• It currently contains 136,755 characters but is capable of storing 4,294,967,296
characters.
• The first 128 are the same as ASCII
Data Representation – Binary
Arithmetic
• Add 10010 to 0010

layout you binary as you would for denary


0010
0010
0100
Binary shift
Shifting the decimal point to the right in a decimal number • Shifting by n places is the same as
multiplies the number by 10 e.g. multiplying by 2n

2.5 - 25
• However by shifting to the right is the
In binary, shifting any place to the left is the same as same as dividing by 2
multiplying by 2:

27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
0 0 0 0 0 1 0 1 =5

27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
0 0 0 0 1 0 1 0 =10

You might also like