160 likes | 305 Views
Binary 1. Number Systems. Base 10 uses the numbers 0-9 Represents numbers as ones, tens, hundreds etc. Number Systems. Base 2 uses the numbers 0-1 Each column is a factor of two To calculate a conversion we add together the things that are included (1) and not the things that aren’t (0).
E N D
Number Systems • Base 10 • uses the numbers 0-9 • Represents numbers as ones, tens, hundreds etc
Number Systems • Base 2 • uses the numbers 0-1 • Each column is a factor of two • To calculate a conversion we add together the things that are included (1) and not the things that aren’t (0)
Binary to Decimal Conversion • Practise converting the following binary to decimal
Binary to Decimal Conversion • SOLUTIONS
Decimal to Binary Conversion • To convert the other way, we work from the highest number to the lowest number asking if it fits in our decimal number • Convert 39 • Does 128 fit into 39? No 0 • Does 64 fit into 39? No 0 • Does 32 fit into 39? Yes 1 how many are left over? 39-32 = 7 • Does 16 fit into 7? No 0 • Does 8 fit into 7? No 0 • Does 4 fit into 7? Yes 1how many are left over? 7-4 = 3 • Does 2 fit into 3? Yes 1how many are left over? 3-2 = 1 • Does 1 fit into 1? Yes 1how many are left over? 1-1=0 • 39 is 00100111
Decimal to Binary Conversion • Using the method in the previous slide, convert the following decimal solutions to binary
Decimal to Binary Conversion • SOLUTIONS
Fractional Numbers • If a decimal number has values after the decimal point we can still convert using the same process
Fractional Numbers • Sometimes we find numbers that we can’t easily fit into the binary grid – for these we use another system • Division by 2 • We repeatedly divide a number by two to get the final solution
Fractional Numbers – Division by 2 • Convert 0.4 • Multiply it by 2 • Put the whole number in one column • Put the remainder in the next column • Carry your remainder to be the starting number in the next row • Repeat these steps • There is no rule how many times you should do this... But I accept 5 times • The binary number in the ‘whole number’ column, from top to bottom, is your binary solution
Fractional Numbers – Division by 2 • Convert 0.3 • Convert 0.24
Characters using Binary • When we use 8 bit binary, each combination can be converted into decimal. • Each decimal value has a character associated with it. • For example: A is 65 a is 97 • Your ASCII character set has been provided as a separate handout.
Characters using Binary • Convert the following:
Characters using Binary • Solutions
Worksheet • Test your new binary < -- > decimal conversion skills with worksheet : Binary_1