Question

In: Computer Science

Perform the following subtraction. Provide both the hexadecimal _____________ and decimal _______________ answer. 12F16 - 8C16...

Perform the following subtraction. Provide both the hexadecimal _____________ and decimal _______________ answer. 12F16 - 8C16

The range of positive integers possible in an 8-bit two’s complement system is (Read this question carefully):

Question 8 options:

1 to 256

1 to 127

-128 to 127

1 to 128

  1. Convert -13210 to a 16-bit 2’s complement in binary ____________ and hexadecimal ______________.

Question 6 options:

Blank # 1
Blank # 2

Convert 110.7510 to binary ______ and hexadecimal ______. Show the answer in both binary and hexadecimal.

Question 5 options:

Blank # 1
Blank # 2

Solutions

Expert Solution

1)
Perform the following subtraction. Provide both the hexadecimal A3 and decimal 163 answer. 12F16 - 8C16

2)
1 to 127

3)
Convert -132 to a 16-bit 2’s complement in binary 1111111101111100 and hexadecimal FF7C

4)
Convert 110.75 to binary 1101110.11 and hexadecimal 6E.C 
Show the answer in both binary and hexadecimal.

Explanation:
-------------
1)
12F
=> 1x16^2+2x16^1+Fx16^0
=> 1x256+2x16+Fx1
=> 1x256+2x16+15x1
=> 256+32+15
=> 303

8C
=> 8x16^1+Cx16^0
=> 8x16+Cx1
=> 8x16+12x1
=> 128+12
=> 140

12F - 8C = 303 - 140 = 163
let's convert 163 to hexadecimal

Divide 163 successively by 16 until the quotient is 0
163/16 = 10, remainder is 3
10/16 = 0, remainder is 10
Read remainders from the bottom to top as A3
Answer: A3

2)
-132
This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 132 successively by 2 until the quotient is 0
   > 132/2 = 66, remainder is 0
   > 66/2 = 33, remainder is 0
   > 33/2 = 16, remainder is 1
   > 16/2 = 8, remainder is 0
   > 8/2 = 4, remainder is 0
   > 4/2 = 2, remainder is 0
   > 2/2 = 1, remainder is 0
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 10000100
So, 132 of decimal is 10000100 in binary
So, 132 in normal binary is 0000000010000100
Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0.
   0000000010000100 is flipped to 1111111101111011
Step 3:. Add 1 to above result
1111111101111011 + 1 = 1111111101111100
so, -132 in 2's complement binary is 1111111101111100

Converting 1111111101111100 to hexadecimal
1111 => F
1111 => F
0111 => 7
1100 => C
So, in hexadecimal 1111111101111100 is 0xFF7C

4)
Converting 110.75 to binary
Convert decimal part first, then the fractional part
> First convert 110 to binary
Divide 110 successively by 2 until the quotient is 0
   > 110/2 = 55, remainder is 0
   > 55/2 = 27, remainder is 1
   > 27/2 = 13, remainder is 1
   > 13/2 = 6, remainder is 1
   > 6/2 = 3, remainder is 0
   > 3/2 = 1, remainder is 1
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1101110
So, 110 of decimal is 1101110 in binary
> Now, Convert 0.75000000 to binary
   > Multiply 0.75000000 with 2. Since 1.50000000 is >= 1. then add 1 to result
   > Multiply 0.50000000 with 2. Since 1.00000000 is >= 1. then add 1 to result
   > This is equal to 1, so, stop calculating
0.75 of decimal is .11 in binary
so, 110.75 in binary is 01101110.11

Hexadecimal     Binary
    0           0000
    1           0001
    2           0010
    3           0011
    4           0100
    5           0101
    6           0110
    7           0111
    8           1000
    9           1001
    A           1010
    B           1011
    C           1100
    D           1101
    E           1110
    F           1111
Use this table to convert from binary to hexadecimal
Converting 01101110.1100 to hexadecimal
0110 => 6
1110 => E
1100 => C
So, in hexadecimal 01101110.1100 is 0x6E.C
Answer: 0x6E.C

Related Solutions

Convert 110.7510 to binary ______ and hexadecimal ______. Show the answer in both binary and hexadecimal....
Convert 110.7510 to binary ______ and hexadecimal ______. Show the answer in both binary and hexadecimal. There are ____________ kilobytes in a megabyte. Convert -13210 to a 16-bit 2’s complement in binary ____________ and hexadecimal ______________.
1) Perform the following addition and subtraction operations. For subtraction, negate the subtrahend (the second value)...
1) Perform the following addition and subtraction operations. For subtraction, negate the subtrahend (the second value) and add. For each operation, show the interpretation as both unsigned and signed operations. Indicate whether an unsigned or signed overflow has occurred that invalidates the result under that interpretation. Use an eight bit byte for all operations and for the signed interpretation, use two’s complement representation. Spaces are used in the binary values only for readability a. 1001 1111 + 0111 1000 b....
Explain the following: a bit, octet, hexadecimal, and decimal value
Explain the following: a bit, octet, hexadecimal, and decimal value
Program that does conversions (i.e. decimal to hexadecimal, binary to decimal) but needs to have a...
Program that does conversions (i.e. decimal to hexadecimal, binary to decimal) but needs to have a drop down menu to give you the option to choose with conversion you want to go from and convert into (JOptionPane). Cannot use the conversion tool that is built-in Java. Need to use equations or some sort. Please include comments on what is happening to understand.
(1) Covert a Hexadecimal to decimal (there is a video for you to watch too). Then...
(1) Covert a Hexadecimal to decimal (there is a video for you to watch too). Then write a program that can convert a binary to decimal (only for integer case). a) Directly use Java built-in method to do this. In this case, only couple lines of code. Hint: Study Integer class in Java. b) Write your own code to convert a binary to decimal from scratch. The input is a binary string. The program output is its corresponding decimal value....
Covert a Hexadecimal to decimal (there is a video for you to watch too). Then write...
Covert a Hexadecimal to decimal (there is a video for you to watch too). Then write a program that can convert a binary to decimal (only for integer case). There are two ways to do so. Easy way: Directly use Java built-in method to do this. In this case, only couple lines of code. Hint: Study Integer class in Java. Hard way: Write your own code to convert a binary to decimal from scratch. The input is a binary string....
Covert a Hexadecimal to decimal (there is a video for you to watch too). Then write...
Covert a Hexadecimal to decimal (there is a video for you to watch too). Then write a program that can convert a binary to decimal (only for integer case). There are two ways to do so. Easy way: Directly use Java built-in method to do this. In this case, only couple lines of code. Hint: Study Integer class in Java. Hard way: Write your own code to convert a binary to decimal from scratch. The input is a binary string....
With a detailed step-by-step process, convert the following decimal number into binary, Hexadecimal and IEEE 754...
With a detailed step-by-step process, convert the following decimal number into binary, Hexadecimal and IEEE 754 formats : 72.nn ( where nn is 80)
Convert the following numbers from decimal to hexadecimal (and for each, indicate how many bytes would...
Convert the following numbers from decimal to hexadecimal (and for each, indicate how many bytes would be needed to store the value of that number): 10 15 16 256 250 358 1024 1023 8195
2. Write a program that asks for hexadecimal number and converts it to decimal. Then change...
2. Write a program that asks for hexadecimal number and converts it to decimal. Then change it to convert an octal number to decimal in perl language.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT