Binary It’s all 0’s and 1’s
Objective for the rest of the Lesson You will be able to convert denary to binary and back again! How to add to add 2 different binary numbers together
Units The most basic and smallest piece of computer data is a bit 8 bits = 1 byte We then measure everything in bits not bytes So kilobyte – 1024 bytes
So what is Binary? Humans use the denary number system Computers use 1 and 0 hence BINARY Its all about what the CPU is reading 0 a switch is open 1 its closed
On Paper! It all about tables! Binary only goes from 0-255 128 64 32 16 8 4 2 1 Denary 86 149 255 It all about tables! Binary only goes from 0-255 Use this chart and you can’t go wrong!
Adding Binary 0 + 0 = 0 1 + 0 = 0 1 + 1 = 10 1 + 1 + 1 = 11 Confused?
Let me explain The first 2 rows are the 2 numbers you are adding 1 The first 2 rows are the 2 numbers you are adding The third row is where the carrying goes The bottom row is the answer
Stage 1 From the rules earlier we know that 1+1=10 1 From the rules earlier we know that 1+1=10 So 0 goes in the fourth row and the 1 carries over
Row 2 is now 0+1+1 which is 10 so the same happen again Stage 2 1 Row 2 is now 0+1+1 which is 10 so the same happen again
Row 3 is now 1+0+1 which is 10 so the same happen again Stage 3 1 Row 3 is now 1+0+1 which is 10 so the same happen again
Row 4 is now 1+1+1 which is 11 so the same happen again Stage 4 1 Row 4 is now 1+1+1 which is 11 so the same happen again
Carry this on until… 1 00011101 10011011+ Simple? 10111000
Overflow? The biggest number you can represent with 8 bits is 255 (128+64+32+16+8+4+2+1) (252) 11111100 (15) 00001111+ (267) 100001011 The computer would need 9 bits to represent 267 so this 9th bit doesn’t fit in the byte allocated. This is overflow.
Finally I need a volunteer…. Tell the class about units What about denary and binary Hands up if you love 1’s and 0’s