Counting – Binary, Hexadecimal, Etc Flashcards
How do you convert from Base 2 to Base 8?
You convert straight from base 2 to base 8 by selecting the base 2 number in threes from right to left and changing to base 10:
110111
Becomes 110 – convert into base ten
111 – convert into base ten
Bring the answers together.
If it can’t be evenly broken into threes, then add ‘0’s to the left most side until it can.
How do you convert from Base 8 to 2?
Convert each digit singly into base 2, then bring them together.
For example, 678 to base 2 is done by converting ‘6’ first to base 2, then ‘7’ to base 2, and after this bring the answers together.
How do you convert base 2 to base 16?
Pick the digits of the number in fours, then make as if you want to convert each pair to base 10.
Bring the answers together, and you have your base 16.
What are the magic fingers?
It’s a way to count in base 2. Label your fingers from your right thumb (it’s easier this way) to your right pinky 1, 2, 4, 8, 16. When counting (left to right) your folded fingers count as ‘0’, and your raised ones as ‘1’.
So if you want to get ‘3’ in base 2, fold all your fingers, raise the one labelled ‘2’ and the one labelled ‘1’. So counting from left to right, you get: ‘11’.
How are binary numbers represented in digital computers?
They are represented via binary storage devices (e.g. flip-flops)
What is sign bit?
Sign bit is a way to represent positive and negative numbers. A bit is fixed in front of the number in question, with ‘0’ representing positive and ‘1’ being negative.
What are the compliment forms?
1’s complement and 2’s complement.
What is the 1’s complement form?
It is a form that works by changing each ‘1’ to a ‘0’, and each ‘0’ to a ‘1’.
Thus 101011 becomes 010100.
What is the 2’s complement form?
The 2’s complement form works by first taking the 1’s complement of the given number, then adding ‘1’ to its Least Significant Bit position (LSB). So to get the 2’s complement of 101011:
1’s complement – 010100
2’s complement – 010101
What is BCD?
It means Binary Coded Decimal and it is a format that assigns each of the ten decimal digits (0-9) a standard equivalence in binary. Numbers >9 are gotten not by standard conversion, but by the combination of each digit’s corresponding BCD value.
E.g., 12 becomes 00010010, which is 1 (0001) and 2 (0010) in BCD written together.
What are the invalid codes in BCD?
1010, 1011, 1100, 1101, 1110, and 1111 are invalid codes in BCD. They are the standard conversions of 10-15 respectively.
10000 is not included cause that’s already >4 bits.
How do you convert positive numbers to 2’s complement?
Positive numbers are left in their normal form; you leave them as they are.
How do you convert signed negative numbers in 1’s complement to decimal?
Do regular conversion to decimal, taking note of the sign bit, then add ‘1’ to the final result (i.e. -24 becomes -24 + 1 = -23
How do you convert signed negative numbers in 2’s complement to decimal?
Regular decimal conversion and take note of the sign.
What is a byte?
A byte is 8-bits, two bytes is 16-bits, on and on…