Converting number bases
Base-ten, Binary, Octal, and Hexadecimal Numbers. Links: based on codequizzes
21 flashcards · Mathematics · by lakesare
Convert 101 base-2 to the corresponding base-10 number.
1*22 + 0*21 + 1*20 = 5 The following lines show the digits and numbering of the base-2 number: digits: 1 0 1 numbering: 2 1 0 Every digit must be multiplied by 2 raised to the numbering. All of these products are summed to compute the result.
Convert 8 base-ten to the corresponding base-2 number.
The divide by two algorithm can be used to convert a base-ten number into a base-2 number. The algorithm starts by dividing the base-ten number by 2. The remainder is the last digit of the binary number and the remainder is divided by 2 again. The algorithm keeps repeating until the result of the division is 0 or 1 - this final result is prepended to the binary number. 1 => 1 2 / 2 => remainder 0 => 0 4 / 2 => remainder 0 => 0 8 / 2 => remainder 0 => 0 8 base-ten is equivalent to 1000 base-2. T…
Convert 12 base-ten to the corresponding base-2 number.
We will use the divide by two algorithm again to solve this problem. We are using integer division when running the algorithm. Integer division is when the fractional part of the division is discarded, so 3 / 2 is 1 with integer division (not 1.5). 1 => 1 3 / 2 => remainder 1 => 1 6 / 2 => remainder 0 => 0 12 / 2 => remainder 0 => 0 The result is 1100.
Convert 545 base-8 (an octal number) to the corresponding base-ten number.
digits: 5 4 5 numbering: 2 1 0 5*(8**2) + 4*(8**1) + 5*(8**0) = 357
Convert D base-16 to the corresponding base-ten number. Base-16 is also referred to as hexadecimal.
Base-16 numbers use the following digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. A is 10, B is 11, C is 12, and so forth. D base-16 is equivalent to 13 base-ten.
Convert 357 base-ten to the corresponding hexadecimal number.
We will use a generalized version of the divide by two algorithm again to solve this problem (we want to convert to a hexadecimal number, so we'll divide by 16). We start by dividing 357 by 16 to get 22 with a reminder of 5. The remainder is prepended to the result and then 22 is divided by 16 to get 1 with a remainder of 6. The divisor (1) is now less than 16, so it is prepended to the result to get 165. 1 => 1 22 / 16 => remainder 6 => 6 357 / 16 => remainder 5 => 5 357/16 = 22 (5) 22 /16 = 6…
Convert 63933 base-ten to the corresponding hexadecimal number.
63933 / 16 = 3995 (13) 3995 / 16 = 249 (11) 249 / 16 = 15 (9) 15 / 16 = 0 (15) The result is F9BD.
How many different numbers can be represented by a two digit base-16 number? How many different numbers can be represented by a two digit base-ten number? (including 00, 01, etc. Max 2-digit)
A two digit base-16 number can represent 256 different numbers 16*16. A two digit base-ten number can only represent 100 different numbers 10*10.
Convert BD4 base-16 to the corresponding base-ten number.
digits: B D 4 numbering: 2 1 0 11*(16**2) + 13*(16**1) + 4*(8**0) = 3028
Calculate: 11010002 - 1010112
1111012
Calculate: 10112 * 1012
1101112
Calculate: 1010012 / 112
11012 with remainder (102)
Calculate: 9D716 + 4BA16
E9116
Convert 101.1012 to base 10.
Calculate: BBB16 - A5D16
15E16 B is smaller than D, therefore we need to borrow 1 from a higher-order B. Which means we're borrowing 16. 16 + B = 16 + 11 = 27. 27 - D = 27 - 13 = 14 = E.
Convert 4E16 to binary.
(4)16 = (0100)2 (E)16 = (1110)2 (4E)16 = (01001110)2 Each 4 digits of a binary number represents a hexadecimal digit. So the best way to convert from binary to hexadecimal is to pad the binary number with leading zeroes so that the number of bits is divisible by four.
By how many digits can 32-bit integer be represented in base 16?
Each 4 bits can be represented by one digit16, therefore 32/4 = 8 digits16. ___ Alternatively: 32-bit integer can represent numbers up to 232. 232 = 16x 232 = 24*x x = 32/4 = 8. Therefore 32-bit integer can be represented by 8 base-16 digits.
Convert 1111101002 to base 16.
1 1111 0100 1F416 Each 4 digits of a binary number represents a hexadecimal digit.
Convert 3.312510 to base 2.
First convert integer part: 310 = 112. Then convert fractional part, by multiplying in by 2, and recording integer part. If we get 1 as an integer part - record it, then discard it for further multiplications. 0.3125 * 2 = 0.625 0.625 * 2 = 1.25 0.25 * 2 = 0.5 0.5 * 2 = 1 0 11.01012.
Convert 2.410 to base 2.
First convert integer part: 210 = 102. Then convert fractional part, by multiplying in by 2, and recording integer part. If we get 1 as an integer part - record it, then discard it for further multiplications. 0.4 * 2 = 0.8 0.8 * 2 = 1.6 0.6 * 2 = 1.2 0.2 * 2 = 0.4 0.4 * 2 = 0.8 0.8 * 2 = 1.6 And we start noticing that we're repeating ourselves. Turns out 2.410 = 10.01100110011...2! Sometimes it's not even repeating - 4.71510 for example converts into irrational 100.10110111...
How to convert: x 10→2 x 2→10 0.y 10→2 0.y 2→10
x 10→2 (divide, remainder, ↑) 12 / 2 = 6 (0) => 0 6 / 2 = 3 (0) => 0 3 / 2 = 1 (1) => 1 1 / 2 = 0 (1) => 1 => read ↑, so: 1100. x 2→10 ...22 21 20 0.y 10→2 (multiply, integer, ↓) 0.y * 2 = 0.625 => 0 0.625 * 2 = 1.25 => 1 0.25 * 2 = 0.5 => 0 0.5 * 2 = 1 => 1 => read ↓, so: .0101 0.y 2→10 0. 2-1 2-2 2-3...