0111 => 7 0100 => 4 and so on.. answer is: 7B.74 c) 123.456 to base-5 100 = 400 20 = 40 3=3 400 + 40 + 3 = 443 5^-1 = 0,2 5^-2 = 0,04 5^-3 = 0,008 0,456/0,2 = 2 0,056/0,04 = 1,4 0,4/0,2 = 2 Final answer 443.212 d) 1 = 0001 2 = 0010 3 = 0011 4 = 0100 5 = 0101 6 = 0110 0001 0010 0011.0100 0101 0110 2) a) 16bit equivalent is a) 0000000001101011 the answer is 006B 1011 is in dec 11 and in hex B 0110 is in dec 6 and in hex also 6 b) 16bit equivalent is b) 0000000010110101 the answer is 00B5 0101 is in dec 5 and in hex also 5 1011 is in dec 11 and in hex B 3) 16bit equivalents to hex a) 0000000001101011 => 006B b) 1111111110110101 => FFB5 4) a) 121 - 185 = -64 in binary it is 11000000 ( 1 in front of 1000000 shows a negative number) b) -70 - 88 = -158 in binary it is 110011110 ( 1 in front of 1000000 shows a negative number) 5) 3A9 + 24D 9+D=6 A+4=F 3+2=5 Answer is 5F6 6) Y = X shl 3 7) evaluate true: A and B (not A)and(not B) 8) Y = true for i from 1 to 20
Numbering systems 1. Convert the decimal number 123.456 to the following formats, taking whole numbers and fractions into account. Show calculations. a) binary b) hexadecimal c) base-5 d) BCD === 1. a) 0111 1011.0111 01002 b) 7B.7416 c) 443.2125 d) 0001 0010 0011.0100 0101 01102 === 2. Extend the following unsigned 8-bit binary numbers to their 16-bit equivalents and convert the result to hexadecimal. a) 011010112 b) 101101012 === 2. a) 006B b) 00B5 === 3. Extend the following signed two’s complement 8-bit binary numbers to their 16-bit equivalents and convert the result to hexadecimal. a) 011010112 b) 101101012 === 3. a) 006B b) FFB5 === Logic and arithmetic 4. Using two’s complement arithmetic, calculate the following (choose a suitable number of bits for the representation): a) 121 – 185 b) -70 – 88 == 4. Convert back to verify answer == 5. Calculate the following without converting the number base. Show calculations.