How many bits in one byte
8
How many bits in a nibble
4
How many states does binary have
2, either 1 or 0
Memory from lowest to highest
Lowest - Kilobyte
Megabyte
Gigabyte
Terabyte
Highest - Petabyte
One byte in each of the units
1 kilobyte = 1000bytes
1 megabyte = 1000 000 bytes
1 gigabyte = 1000 000 000 bytes
1 terabyte= 100 000 000 000bytes
1 petabyte= 1000 000 000 000 000bytes
Generally what is the memory of secondary storage measured in
Terabytes
What base is binary
Base 2
So it is arranged:
The highest binary number would be 255, which is 11111111
What are the rules for binary addition
Whenever 1+1 write 0 and carry 1
Whenever 1+1+1 write 1 and carry 1
Whenever 1+0 write 1 carry 0
What is the effect in binary shifts if we shift to the left
The original number is multiplied by the shift as a power of 2
Eg
00001111 ————————————-> 00111100
15. Multiplied by 2^2. 60
The shift was 2, so it was multiplied by 2^2
What happens when we shift to the right
Shifting to the right has the affect of /2 the number
Eg of a shift was 3 to the right it would be the original number / 2^3
-> So it Would be original number/8
01110000 —————————————> 00001110
112. Shift 3 so divide by 2^3. 14
Why do we use hexadecimal
Strings like 01011011 are really hard to remember, so to fix this we use hexadecimal, where each nibble (4 bits) represents a character
Smallest 4 bit number
0000
Largest 4 bit number
1111
How many different combinations can you have with just 4 bits
16
What does 1111 represent in hexadecimal
The letter F
What happens after the letter F Im hexadecimal (it is the largest nibble value)
Then we go back to using full bytes.
Eg after F would be 00010000= 1 0 in hex
How to convert from decimal to hex
Hexadecimal uses base 16
Eg converting 182 to hex
Do 182/16
= 11 remainder 6
Then use a table to write each induvidual number in hex
11 = B
6 = 6
Therefore 182 = B6 in hex
You could also convert 182 to binary then use the binary for hex but that takes longer
Convert hex to decimal
Just like binary, hex is written like
Etc …. 16^5. 16^4. 16^3. 16^2. 16^1. 16^0
So if our hex was 23F, then you woukd do
16^2 x 2
16^1 x 3
16^0 x 15 (*F is 15 numerically)
512+48+15=575
So 23F is 573 in decimal
2 advantages of hex
Expressed more compactly
Easier to understand
What does ASCII stand for
American Standard Code for Information Interchange
How many bits does regular ASCII use
7 bits to code each character
Biggest value that can be held in ASCII
127 (decimal) or 1111111
Therefore 128 characters can be represented (0-127)
How to represent a in regular ASCJI
97
How to represent A in regular ASCJI
65