Number Bases Flashcards
What is Decimal (base 10)?
The decimal number system is based on the use of 10 digits: 0,1,2,3,4,5,6,7,8,9
What is binary (base 2)?
The binary number system is based on the use of 2 digits: 0 and 1
What is hexadecimal (base 16)?
The hexadecimal number system is based on the use of 16 digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F where A=10, B=11, C=12, D=13, E=14 and F=15
How do you convert binary to decimal? (example)
To convert binary 1011 0101 to decimal, write the binary numbers into a table in the correct order
128 64 32 16 8 4 2 1
1 0 1 1 0 1 0 1
Then add the decimal numbers where 1 is shown, so 1011 01012 = 128 + 32 + 16 + 4 + 1 = 18110
How do you convert decimal to binary? (example)
To convert decimal 133 to binary, create a table with the binary place values and use the steps below:
1. Find the largest place value that is less than or equal to 133.
In this case, it is 128, so write 1 in row below 128.
2. Subtract 128 from 133 to obtain 5. Find the largest place value that is less than or equal to 5.
In this case, it is 4, so write 1 in row below 4.
3. Subtract 4 from 5 to obtain 1. Find the largest place value that is less than or equal to 1.
In this case, it is 1, so write 1 in row below 1.
4. Complete the process by adding 0 to all the blanks in the table.
128 64 32 16 8 4 2 1 Giving
13310 = 1000 01012
1 0 0 0 0 1 0 1
What is a hexadecimal number system?
The hexadecimal number system (or hex) is based on 16 states.
How do you convert binary to hexadecimal?
Example:
To convert binary 11111011 into hexadecimal use the steps below:
1. Treat the 8-bit binary code as two hexadecimal nibbles: 1111 and 1011.
So, 111110112 = FB16
How do you convert hexadecimal to binary?
Example:
To convert hexadecimal A9 into binary use the steps below:
1. Convert the two hexadecimal
so A16 = 10102 and 916 = 10012.
2. Join them together to form an 8-bit binary number.
So, A916 = 101010012
How do you convert decimal to hexadecimal?
Convert decimal to binary and then convert binary to hex.
Example – convert 18910 to hexadecimal
- 189 decimal is converted to binary; therefore, 101111012 = 18910
128 64 32 16 8 4 2 1
1 0 1 1 1 1 0 1 - Split the binary number into (4-bit) nibbles
8 4 2 1 8 4 2 1
1 0 1 1 1 1 0 1 - Add up each nibble (value between 0 and 15) and convert into hex
Giving 10112 = 1110 = B16 and 11012 = 1310 = D16
Therefore, 18910 = 101111012 = BD16
How do you convert hexadecimal to decimal?
Convert hexadecimal to binary and then convert binary to decimal.
Example – convert 5ED16 to decimal
- 5ED16 is converted to binary so 0101111011012 = 5ED16
5 E D
8 4 2 1 8 4 2 1 8 4 2 1
0 1 0 1 1 1 1 0 1 1 0 1 - Convert the binary into decimal using the table below:
1024 512 256 128 64 32 16 8 4 2 1
1 0 1 1 1 1 0 1 1 0 1 - 1024 + 256 + 128 + 64 + 32 + 8 + 4 + 1 = 151710