Lecture 7 Conversion to Different Number Bases Flashcards
What is the first step to convert between bases?
Convert to base 10 first [1].
What is the second step to convert between bases?
Perform successive division by the new base [1].
What is successive division?
Successive division involves whole numbers, without decimals [1, 2].
How do you perform successive division?
Divide the number, keep track of the remainder, and prepend it to the existing remainders [2, 3].
When do you stop successive division?
When the number is unsigned and can’t be divided any further [4].
How do you convert 631 base 7 to base 5?
Convert 631 base 7 to 316 base 10, then use successive division by 5 to get 2231 base 5 [5].
What is a shortcut for converting between base-2 numbers (binary) and their variants (quaternary, octal, hex)?
You can easily convert between them without using base-10 as an intermediate form [5].
How many binary digits represent each digit in base-8 (octal)?
Each digit in base-8 is represented by 3 digits in binary because log2(8) = 3 [6].
How do you convert 741 base 8 to binary?
7 in base 8 is 111 in binary, 4 in base 8 is 100 in binary, and 1 in base 8 is 001 in binary. Thus, 741 in base 8 is 111100001 in binary [6].
How many binary digits represent each digit in hexadecimal?
Each digit in hexadecimal is represented by 4 digits in binary because log2(16) = 4 [6].
How do you handle fewer than 4 bits when converting binary to hexadecimal?
Prepend as many zeroes as needed until you have 4 bits [7].
What happens if an additional bit is produced during the addition of binary numbers because of a carry out?
The carry out is stored elsewhere, such as in a status register on processors [7].
What is overflow?
Overflow is when a computer stores an incorrect value after an operation due to not having enough memory to represent the number [8].
In subtraction of unsigned binary numbers, what do you do when you need to subtract 1 from 0?
Borrow from the next significant bit, which effectively becomes 10 (base 2) - 01 (base 2) [9].
What are the two methods covered for representing signed numbers in binary?
Sign/Magnitude Representation and Two’s Complement [10].
What are the two components of Sign/Magnitude Representation?
Sign: The most significant bit indicates the sign (1 for negative). Magnitude: The remaining bits represent the magnitude as an unsigned integer [10].
How is a negative number represented in Sign/Magnitude?
“The most significant bit is set to 1 to indicate a negative number, and the remaining bits represent