


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Decimal number 55 a) Convert this to binary. 55 div 2 = 27 rem 1 27 div 2 = 13 rem 1 13 div 2 = 6 rem 1 6 div 2 = 3 rem 0 3 div 2 = 1 rem 1 1 div 2 = 0 rem 1 110111 0011 0111 b) Convert this to hexadecimal 0011 in binary is hexadecimal 3 0111 in binary is hexadecimal 7 0x Also 55 = 48 + 7 = 316 + 7 = 0x c) Show this number as a zoned decimal. The EBCDIC code for the character ‘5’ is F5. The EBCDIC representation for the string “55” is F5 F5. The zone for each is the hexadecimal F. For a positive number replace the last zone by ‘C’ F5 C5. d) Show this number as a packed decimal. First, make this an odd number of digits: 055 All positive numbers end in the hexadecimal digit C, so the value is 05 5C. e) What is the decimal value of the hexadecimal 05 5C? 5 16 2
Decimal number 173.25. a) Convert this to binary. Whole number part: convert 173 to binary. 173 / 2 = 86 1 86 / 2 = 43 0 43 / 2 = 21 1 21 / 2 = 10 1 10 / 2 = 5 0 5 / 2 = 2 1 2 / 2 = 1 0 1 / 2 = 0 1 1010 1101 Convert the decimal part to binary. .25 2 = 0. .50 2 = 1. .00 2 = 0.00. Note that .01 in binary stands for 0/2 + 1/4 = 1/4. b) Convert to hexadecimal Start with the binary. 1010 1101. Pad with trailing zeroes 1010 1101. Convert: A D. 4 Straight conversion: 173 = 1016 + 13 173 / 16 = 10 rem 13. But 13 is less than 16. Decimal 10 is 0xA Decimal 13 is 0xD AD 0.2516 = 4