Binary to Decimal Conversion Worksheet Try to work out these binary numbers The word binary means two. The binary number system has two symbols: 0 and 1. When we write binary numbers we use a “2” for a subscript to represent the binary system. A “bit” (short for “binary digit”) is the smallest piece of data that a computer knows. It is a single digit, which can be a one or a zero. A “word” is a group of any number of bits. A “byte” is a group of 8 bits, You would have 256 different combinations if you wrote down all the different possible combinations of ones and zeros that could make up a byte. One – on Zero – off Add up the place value for everyone 1. 27 128 1 0 0 0 1 1 26 64 0 0 0 1 1 1 25 32 1 1 1 1 1 1 24 16 0 1 1 0 0 0 23 8 1 0 1 0 1 0 22 4 0 0 0 0 1 0 21 2 0 1 0 1 1 0 20 1 1 0 0 0 0 1 Mathematical Way Binary to Decimal 1 27 0 26 Find the place value for everyone. Multiple 1 by that place value. 1 25 0 24 1 23 0 22 0 21 1 20 1 x 27 1 x 25 1 x 23 1 x 20 128 + 32 + 8 + 1 = = Converter Tool with explanation. http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/nav2tool.html Cisco Binary Game: Practice: Convert 1100011 to decimal 169 Answer From Binary to Hexadecimal Hexidecimal, or base 16, number system is a common system used with computers. It is a human-friendly representation of binary-coded values in computing and digital electronics. It is used in web pages for colors. Hexadecimal is represented by 16 digits 0-9 and then A – F A = 10, B = 11, C = 12, D = 13, E = 14, F = 15 Converting Binary to Hex 10001100101001 STEP ONE: Take the binary number and from right to left, group all placeholders in groups of 4. Add leading zeros, if necessary: 0010 0011 0010 1001 2 STEP TWO: Convert each triplet to its single-digit octal equivalent. (HINT: For each group of 4, the hex conversion is the same as converting to a decimal number): 0010 0011 2 3 2329 0010 2 1001 2 9 hex 16 You do it: Practice: convert 11001110 to Hex Converting Hex to Binary 2329 16 STEP ONE: Take each hex digit and convert each digit to a binary form. Keep leading zeros: 0010 2329 16 0011 0010 1001 10001100101001 = You do it: Practice: convert 4AB to Binary Octal - Base 8 Numbering System The octal, or base 8, number system is a common system used with computers. Because of its relationship with the binary system, it is useful in programming some types of computers. Converting Binary to Octal Take the binary number 10001100101001 STEP ONE: Take the binary number and from right to left, group all placeholders in group of 3. Add leading zero at end if necessary: 010 001 100 101 001 2 STEP TWO: Find the binary number for that group of 3. 010 001 100 101 001 2 1 4 10001100101001 = 2 5 1 21451 oct 8 You do it: Practice: convert 11001110 to Oct Converting Octal to Binary 43520 8 Bring the numbers the binary group of 3 4 100 3 011 5 101 2 0 010 000 You do it: Practice: convert 100011101010000 2643 to binary = 43520 oct Binary Numbers The base value of a number system tells us how many digits we have to work with and what is the place value of each digit in a number. Binary is base 2 Consist of either 0 or 1. 0 is false or off 1 is true or on Decimal Binary Base 10 Base 2 89 1011001 Hexadecimal Octal Base 16 Base 8 59 131 (8 x 101 ) + (9 x 100) = 89 (1 * 26) + (1 * 24) + (1 * 23) + (1 * 20) = 89 (5 * 161) + (9 * 160) = 89 (1 * 82) + (3 * 81+ (1 * 80) = 89 27 26 25 24 23 22 21 2o 128 0 64 1 32 0 16 1 8 1 4 0 2 0 1 1 To convert to decimal, multiply the (1 * 26) )+( 1 *24) + (1 * 23 )+ (1 * 20) 64 + 16 + 8 + 1 = 89 Hexadecimal is base 16 Hex number 59 convert to decimal 163 162 161 16o 4096 256 16 5 1 9 A 2 use 0-9 for digits 0 – 9 use A-F for digits 10-15 Convert to Decimal: Multiply the digit by its base 16 value for the place value position (5 x 161) + (9 x 160) 5 x 161 = 5 x 16 = 80 9 x 160 = 9 x 1 = 9 80 + 9 = 89 A = 10 (10 x 161) + (2 x 160) = 160 + 2 = 162 OCTAL TO DECIMAL Octal is base 8 Octal number 131 convert to decimal 83 82 81 8o 512 64 1 8 3 1 1 Convert to Decimal: Multiply the digit by its base 8 value for the place value position (1 x 82) + ( 3 x 81) + (1 x 80) 1 x 64 = 64 3 x 81 = 3 x 8 = 24 1 x 80 = 1 x 1 = 1 64 + 24 + 1 = 89 Practice: Convert to decimal Numbering System 1100111 bin 3BC hex 3540 oct Decimal