So 123.45610 = 443.2125 d) BCD 1 2 3 . 4 5 6 0001 0010 0011 0100 0101 0110 2. Extend the following unsigned 8-bit binary numbers to their 16-bit equivalents and convert the result to hexadecimal. a) 011010112 16-bit equivalent is 0000 0000 0110 10112 Result in hexadecimal = 006B16 = 6B16 b) 101101012 16-bit equivalent is 0000 0000 1011 01012 Result in hexadecimal = 00B516 = B516 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 16-bit equivalent is 0000 0000 0110 10112 Result in hexadecimal = 006B16 b) 101101012 16-bit equivalent is 1111 1111 1011 01012 Result in hexadecimal = FFB516 Logic and arithmetic 4
Mictrocontroller Week 03 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