Binary and Hex Conversions Flashcards
How do you add binary numbers?
1 + 1 = 0 where you carry 1 to the next line
1 + 1 + 1 = 1 where you carry 1 the next line
0 + 0 = 0
1 + 0 = 1
What is a binary shift also known as?
A logical shift
What happens in a binary shift to the left?
The number (in decimal) get multiplied by 2 (to the power of however many shift were done)
What happens in a binary shift the right?
The number (in decimal) get divided by 2 (to the power of however many shift were done)
What does each hex digit equate to in binary?
A nibble (four 1s and 0s)
What does moving right to left in a hexadecimal table do?
Increase in powers of 16
How do you convert from hex to decimal
- Draw the table (goes up in powers of 16)
- Write the hex number in the table
- Multiply the numbers in each column
- Add up the results for each column
How do you convert from decimal to hexadecimal?
- Draw the table and start from the left
- Divide the number you are converting by the number of the top of the left column
- Divide the remainder by the number at the top of each column until you get 0
- Convert the numbers at the bottom of each column into hex separately and put them together
What are the conversions from decimal to hexadecimal?
0 to 9 (in decimal) = 0 to 9 (in hex)
10 to 15 (in decimal) = A to F (in hex)
How do you convert from binary to hexadecimal?
- Split the binary number into nibbles (10111001 = 1011 1001)
- Draw 2 tables (dependent on the number of nibbled) with columns labelled 1 to 8 and fill them in
- Convert those separate tables into decimal
- Convert the decimal numbers into hex and put them together
How do you convert hexadecimal do binary?
- Convert the hex digits separately into decimal
- Convert those decimal numbers into binary
- Put them together to get a big binary number
Do computers use hex?
No, they still have to convert everything to binary
Why is hex used?
It’s simpler to remember large numbers in hex
Hex numbers are shorter - less chance of input errors
Easier to convert between binary and hex than binary and decimal
What is the number base for decimal numbers?
10
What is the number base for binary?
2