Question

3) Convert following decimal to 8-bit signed numbers in hexadecimal, use two’s-complement for signed integer 127d,...

3) Convert following decimal to 8-bit signed numbers in hexadecimal, use two’s-complement for signed integer

127d, -20d, -128d, -1d

4) Convert the 16-bit signed numbers to the decimal

C0A3h, 3AECh, 0101 1001 0111b, 1011 0101 1001 0111b

please solve the problems step by step. It would be of great help.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you need any corrections or clarifications kindly comment

Please give a Thumps Up if you like the answer.

3) Convert following decimal to 8-bit signed numbers in hexadecimal

Steps for converting decimal to hexadecimal number(unsigned numbers):

  1. Start dividing the decimal number by 16.

  2. Note down the remainder in decimal and in hexadecimal.

  3. Again divide the quotient by 16.

  4. Repeat step 2 and 3 until quotient is equal to 0.

  5. The hexadecimal value is the sequence of the remainders in hex from the last to first.

HEXADECIMAL

0

1

2

3

4

5

6

7

8

9

A

B

C

D

E

F

DECIMAL

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

a) 127 d=7F in hexadecimal

DIVISION

RESULT

REMAINDER

REMAINDER
(in HEX)

127 / 16

7

15

F

7/ 16

0

7

7

ANSWER

7F

Steps for converting signed decimal to hexadecimal

  1. First convert the decimal number to two's complement signed binary.
  2. Then convert that binary value to hexadecimal.

b) -20d

Step1: Convert 2010 to binary:

Division
by 2

Quotient

Remainder

Bit #

20/2

10

0

0

10/2

5

0

1

5/2

2

1

2

2/2

1

0

3

1/2

0

1

4

So 2010 = 0101002

Fill the value to 16 bits by adding 10 leading zeroes on the left

Thus 2010 = 0000 0000 0001 01002

Step2: Convert to 1’s complement by inverting the bits

Result=1111 1111 1110 1011

Step 3: Find 2’s complement by adding 1 to the above result

Result=1111 1111 1110 1011+1=1111 1111 1110 1100

Step 4: Convert this binary value to hexadecimal. For that group the bits into groups of four, then convert each group to its hexadecimal equivalent

1111 1111 1110 1100b=FFEC in hexadecimal

b) -128d

Step1: Convert 12810 to binary:

Division
by 2

Quotient

Remainder

Bit #

128/2

64

0

0

64/2

32

0

1

32/2

16

0

2

16/2

8

0

3

8/2

4

0

4

4/2

2

0

5

2/2

1

0

6

1/2

0

1

7

So 12810 = 1000 00002

Fill the value to 16 bits by adding 8 leading zeroes on the left.

Thus 12810 = 0000 0000 1000 00002

Step2: Convert to 1’s complement by inverting the bits

Result=1111 1111 0111 1111

Step 3: Find 2’s complement by adding 1 to the above result

Result=1111 1111 0111 1111+1=1111 1111 1000 0000

Step 4: Convert this binary value to hexadecimal. For that group the bits into groups of four, then convert each group to its hexadecimal equivalent

1111 1111 1000 0000=FF80 in hexadecimal

d) -1d

Step1: Convert 110 to binary:

Division
by 2

Quotient

Remainder

Bit #

1/2

0

1

0

So 110 = 12

Fill the value to 16 bits by adding 15 leading zeroes on the left

Thus 110 = 0000 0000 0000 00012

Step2: Convert to 1’s complement by inverting the bits

Result=1111 1111 1111 1110

Step 3: Find 2’s complement by adding 1 to the above result

Result=1111 1111 1111 1110+1=1111 1111 1111 1111

Step 4: Convert this binary value to hexadecimal. For that group the bits into groups of four, then convert each group to its hexadecimal equivalent

1111 1111 1111 1111b=FFFF in hexadecimal

4) Convert the 16-bit signed numbers to the decimal

a. C0A3h=49315d

Ch=12d

Ah=10d

C0A3=12*163+0*162+10*161+3*160

        =12*4096+0+10*16+3*1

       =49152+0+160+3

       =49315

b. 3AECh=15084d

Ch=12d

Eh=14d

Ah=10d

3AEC=3*163+10*162+14*161+12*160

        =3*4096+10*256+14*16+12*1

       =12288+2560+224+12

       =15084

c.0101 1001 0111b=1431d

0101 1001 0111=(0*211)+(1*210)+(0*29)+(1*28)+(1*27)+(0*26)+(0*25)+(1*24)+(0*23)+(1*22)+(1*21)+(1*20)

=0+1024+0+256+128+0+0+16+0+4+2+1

=1431

d.

1011 0101 1001 0111b=46487d

1011 0101 1001 0111b=

(1*215)+(0*214)+(1*213)+(1*212)+(0*211)+(1*210)+(0*29)+(1*28)+(1*27)+(0*26)+(0*25)+(1*24)+(0*23)+(1*22)+(1*21)+(1*20)

=32768+0+8192+4096+0+1024+0+256+128+0+0+16+0+4+2+1

=46487

Add a comment
Know the answer?
Add Answer to:
3) Convert following decimal to 8-bit signed numbers in hexadecimal, use two’s-complement for signed integer 127d,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT