number systems Flashcards
how do you convert hexadecimal to decimal?
You multiply the first place by 1, the second by 16, the third by 256, the fourth by 4096, and so on. Then add them all up!
ex: C5 = 5 * 1 + 13 * 16 = 213
how do you convert binary to decimal?
take a binary number.. ex: 1001 0010
each place (1st, 2nd, 3rd…) corresponds to these* places
1 0 0 1 0 0 1 0
* 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
Then add up the numbers underneath the ones!
how do you convert binary to hexadecimal?
If you know how to convert binary to decimal, take the same thing and change the 10s to A, B C D E F etc.
how do you convert decimal to hexadecimal?
Remainder Method take a number ( ex 100) divide by 16 until you get to 1 the remainder is the answer but.. in hex it goes: 1 2 3 4 5 6 7 8 9 A B C D E F G 100 / 16 = 6 R 4 6 / 16 = 0 R 6 read up the answer is 64
how do you convert decimal to binary? (subtraction method)
take a number (ex 100)
subtract it by all the numbers * that you can (starting at the largest) until you can’t subtract anymore
add a 0 for the numbers you can’t subtract from and a 1 for the ones you can
so .. 100 - 64 = 36 - 32 = 4 - 4 = 0
the answer is 0110 0100
how to convert decimal to binary? (remainder method)
take a number ( ex 100) divide by 2 until you get to 1 add a 1 on the side if there is a remainder and a 0 if there isn’t 100 / 2 = 50 0 50 / 2 = 25 0 25 / 2 = 12 R1 1 12 / 2 = 6 0 6 / 2 = 3 0 3 / 2 = 1 R1 1 read from bottom up: the answer is 1001 00
What is A50 in decimal?
0 * 1 + 5 * 16 + 10 * 256 = 2640
What is 100 in binary?
100 / 2 = 50 R0 50 / 2 = 25 R0 25 / 2 = 12 R1 12 / 2 = 6 R0 6 / 2 = 3 R0 3 / 2 = 1 R1
so 100 will be 100100.
Count to 15 in hex.
1 2 3 4 5 6 7 8 9 A B C D E F
Count to 15 in binary.
0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111
Explain how to do ‘one’s complement’.
when subtracting two binary numbers, you can do ‘ones complement’ by
- taking the number you are subtracting by and reversing all the 0s to 1s and 1s to 0s.
- adding the two numbers
- if there is a carryover at the end, add it to the back.
- if there isn’t, reverse the numbers back to their original form (1s back to 0s and vice versa) and make the number negative