Question: 6. [Ref: $2.2 of the Chapter 2 lecture notes - Base conversions of integer values] A computing professional, especially a programmer (and especially a systems

6. [Ref: $2.2 of the Chapter 2 lecture notes - Base conversions of integer values] A computing professional, especially a programmer (and especially a systems programmer), must understand the diff- erent commonly-used mathematical bases or numeral systems that are used to represent integers in computing, of which there are four: binary or base 2; octal or base 8; decimal or base 10; and hexadecimal or base 16. Additionally, he/she must be able to convert integer values among these bases. Consequently, you are being provided with the op- portunity now to demonstrate your knowledge of how to do this. We shall continue to assume we are dealing with an n = 16-bit microprocessor, so each integer value is represented using 16-bits. We will not ask you any questions above converting to or from octal because that base is not as commonly used today as it was in the past. Note that when we say "unsigned" we mean the value is non-negative and is not represented in two's complement notation. When we say "signed" we mean the value can be negative or non-negative and is represented in two's complement. For each exer- cise, explain how you obtained your answer! (a) Convert the unsigned binary integer 1010_0101_0011_1100, to the equivalent value in decimal". (b) Convert 2152.0 to the equivalent hex value. (c) Convert the unsigned hexadecimal integer CAFE16 to binary. (d) Convert the signed hexadecimal integer DEAD 16 to decimal. (e) Convert the signed binary integer 0010101111110111, to hex. (f) Convert the signed binary integer 10000000000000002 to decimal. (g) Convert -5891.0 to a signed binary integer (two's complement). Kevin R. Burger :: Computer Science & Engineering :: Arizona State University :: Rev 041201 Page 2 i For example, if binary number we are converting is 11012, then your explanation would be something to the effect that 11012 = 1 x 2 + 1 x 22 + 1 x 2 = 8 + 4 + 1 = 13,0. For conversions among other bases, your explanation will be a similar equation. It is fairly common to use underscores to partition the digits of binary and hex numbers in order to make the number more readable in the same way we use commas to partition the digits of decimal numbers into groups of three digits each because 2130891231257 is not as readable as 2,130,891,231,257). Also, I will often write a subscript of 2, 8, 10, or 16, following the number to indicate the base, especially when it is not obvious, e.g., what is 111? Well, it could be 710 if 111 is a binary number, or it could be 11110 if 111 is a decimal number, or it could be 7310 if 111 is an octal number, or it could be 27310 if 111 is a hex number, or it could be 13 if 111 is a ternary number, etc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
