# Binary conversion

## Denary to binary conversion

To convert denary numbers (regular whole numbers) to binary numbers (a string of 1's and 0's) you must first make an 8 by 3 table with the numbers; 128, 64, 32, 16, 8, 4, 2 and 1 in the top row.Now ,starting at the right, see if the denary number you are trying to turn into binary is smaller than or equal to the number 128, if so you write yes in the row below in the same column and below that write the number 1 then move onto the next number. If it isn't then write now in the box and 0 below then move onto the next number and repeat until you have used all of the numbers to make your denary number. This method will work for any denary number less than 255 - including 255

## Binary to denary conversion

To convert binary numbers to denary numbers you must first draw out the same table used before then take your 8 bit binary number and put it into the bottom row of the table.then take all of the numbers that have a 1 below them then add them together.This is your denary number.

For example the number 68 you would write a 0 in the 128 column because 68 is smaller than it.

then write a 1 in the 64 column because it is smaller than 68

then put a 0 in the 32, 16 and 8 columns because 64 add any of them would be larger than 68.

then write a 1 in the 4 column because it is 64 add 4 is equal to 68.

then write a 0 in the rest of the columns because you have reached 68.