BINARY Toby Wilson Be able to convert binary to denary Be able to convert denary into binary Be able to explain how computers use binary LEARNING OBJECTIVES A number system that uses two digits, 0 and 1 (Base 2 = 0 & 1) (Base 10 = 0,1,2,3,4,5,6,7,8 & 9) WHAT IS BINARY? A bit is a digit in a binary number It can be either 1 or 0 A BIT 0001 The number above includes 4 bits Each bit is worth a different value They work from right to left In the number, 0 = 8 0 = 4 0 = 2 1 = 1 BINARY NUMBERS Denary is a regular number . Eg 8 To convert a binary number into denary , you add up the value of each bit and there you have your result 1011 = 11 8 0 1011 1 BINARY TO DENARY CONVERSION 2 1010 = 10 0011 = 3 1001 = 9 1111 = 15 10010 = 18 10111011 = 187 QUESTION ANSWERS This is the opposite of binary to denary This is where you are given a denary number and you need to convert it in to binary Eg. 22 22 – 16 (10000) = 6 22 = 10110 6 – 4 (10100) = 2 – 2 (10110) = 0 DENARY TO BINARY CONVERSION 13 – 8 = 5 – 4 = 1 – 1 = 0 (1101) 7 – 4 = 3 -2 = 1 – 1 = 0 (111) 29 – 16 = 13 – 8 = 5 – 4 = 1 -1 = 0 42 – 32 = 10 -8 = 2 -2 = 0 62 – 32 = 30 – 16 = 14 – 8 = 6 – 4 = 2 – 2 = 0 (111110) 200 – 128 = 72 – 64 = 8 – 8 = 0 (11101) (10101) (11001000) QUESTION ANSWERS Bit – Binary Digit Nibble – 4 Bit Binary Number Byte – 8 Bit Binary Number Kilobyte – 10 Bit Binary Number Megabyte – 20 Bit Binary Number Gigabyte – 30 Bit Binary Number Terabyte – 40 Bit Binary Number DEFINITIONS Binary is used to represent all types of data in a computer For example, Colours Colours are made up of Red, Green and Blue Each of these colours are a byte The combination of these three bytes will give you a huge range of colours to choose from HOW IS BINARY USED? I need to find out how binary represents the following three areas: Images Sound Text RESEARCH TASK The pictures are made up of pixels, each with an 8-bit number representing a certain shade (Out of 256) HOW BINARY IS USED TO REPRESENT IMAGES HEXADECIMAL 4C = 01001100 F5 = 11110101 Denary Binary Hex Denary Binary Hex 0 0000 0 10 1010 A 1 0001 1 11 1011 B 2 0010 2 12 1100 C 3 0011 3 13 1101 D 4 0100 4 14 1110 E 5 0101 5 15 1111 F 6 0110 6 - - - 7 0111 7 - - - 8 1000 8 - - - 9 1001 9 - - - Den Bin Hex 45 0010 1101 45 45 0010 1101 45 HEXADECIMAL QUESTIONS HOW TO ADD IT UP 70(16) = 0111 0000 = 112 70(10) = 0100 0110 = 46 To Binary: (128 64 32 16 8421) 0 0 0 0 0000 To Hexidecimal: (8421 8421) 0000 0000 Then add all together Every 4 bits = 1 Digit EG: 1101 1011 = 8 + 7 = 15