Why do computers use binary?
• Computers understand only two states: power on, or power off
• This is represented by switches, and computers are essentially calculators made up of billions of switches where…
• Power on = 1
• Power off = 0
Hence, it stores data as binary, consisting of only 0s and 1s.
Everything that a computer needs to process/store…
Must be converted into binary format (eg. numbers, text, images, sound, programs instructions are all stored as a collection of binary digits)
1 bit is…
A single 0 or 1
A nibble is…
4 bits
A byte is…
8 bits (eg. one character of text)
a kilobyte (KB) is…
1000 bytes
a megabyte (MB) is…
1 000 000 bytes, or 1000 kilobytes
A gigabyte (GB) is…
1 000 000 000 bytes or 1000 MB
A terabyte (TB) is…
1000 GB
A petabyte (PB) is…
1000 TB
One character takes up…
1 byte
A full page of text takes up…
30 KB
One small digital colour photograph takes up…
3 MB
Music CD capacity is…
650 MB
DVD capacity is…
4.5 GB
Hard disk capacity is…
1 TB
How many values can you have with 1 bit?
2
With 2 bits, it is 4
3 bits: 8
4 bits: 16
To find the number of combinations for the number of bits, do:
2 ^ (the number of bits available)
Binary vs denary
• Denary is a base 10 number system with 10 digits 0-9
• Binary is a base 2 number system with 2 digits, 0 and 1
What is 10010110 in denary?
128 + 16 + 4 + 2 =150
Convert 56 into 8-bit binary
00111000
What is 10010110 in denary?
128 + 16 + 4 + 2 =150
What is the MSB?
It is the most significant bit, or the bit with the largest value. This is the bit furthest to the left.
What is the LSB?
It is the least significant bit, or the bit with the smallest value. This is the bit furthest to the right.
What is the largest number that can be represented with n bits?
2^(n) - 1
Remember: the total number of values that can be represented is 2^(n)