COMPUTER ORGANIZATION+DESIGN >I<
COMPUTER ORGANIZATION+DESIGN >I<
5th Edition
ISBN: 9781541868397
Author: Patterson
Publisher: ZYBOOKS (CC)
Question
Book Icon
Chapter 3, Problem 3.1E
Program Plan Intro

Hexadecimal numbers:

In mathematics, hexadecimal numbers are positional numbers with a base or a radix of “16” which uses symbols “0–9” to represent values zero to nine, and “A–F” (or alternatively “a–f”) to represent values ten to fifteen.

Given Instruction: 5ED4-07A4

Expert Solution & Answer
Check Mark

Explanation of Solution

Hexadecimal numbers Operations:

Step-1:

Converting “5ED4” hexadecimal number to decimal format.

Hexadecimal numbers are written with the base of “16”, which means that each digit takes 4 bits as “16=24”.

Base 16 uses symbols “0–9” to represent values zero to nine, and “A–F” (or alternatively “a–f”) to represent values ten to fifteen.

The 16 digits of hexadecimal representation are: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

5ED4

=5*163+E*162+D*161+4*160=5*163+14*162+13*161+4*160=5*4096+14*256+13*16+4*1=20480+3584+208+4

 = 24276 in decimal base

Hence, the decimal value of “5ED4” is “24276”.

Step-2:

Converting “07A4” hexadecimal number to decimal format.

07A4=0*163+7*162+A*161+4*160=0*163+7*162+10*161+4*160=0*4096+7*256+10*16+4*1

=0+1792+160+4=1956indecimalbase

Hence, the decimal value of “07A4” is “1956”.

Step-3:

Performing “5ED4-07A4

As the numbers are represented in unsigned magnitude format, a simple subtraction operation occur which results in:

=5ED4 –07A4(hex)=24276 - 1956 (decimal) =22320

Step-4:

The above value is in decimal format and hence one needs to convert the result into hexadecimal form.

In order to convert the value into hexadecimal, one needs to find the biggest power of 16.

163=4096” and hence the biggest power is “3”.

Now, one needs to divide the number by the highest power to see how many times it fits, which results as:

22320 / 4096 =5.45. = 5

Now “5 * 4096 = 20480”, and one needs to subtract that from the number which results in:

22320  20480 = 1840”.

Now, the next power that fits in this number is “162=256”, and it fits:

1840 / 256 = 7.18.. times.

Also, “256*7 = 1792”.

Next, one needs to subtract the above result:

1840  1792 = 48”.

The next power that fits is “161=16”, and it fits “48 / 16 = 3” times exactly.

Hence, “5ED4-07A4

=22320(decimal)=5*163+7*162+3*161+0*160=5730(hexadecimal)

Hence, the unsigned operation “5ED407A4” results into “5730” as hexadecimal.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
I need help with this problem and an explanation of the solution for the image described below. (Introduction to Signals and Systems)
I need help with this problem and an explanation of the solution for the image described below. (Introduction to Signals and Systems)
Solve the following questions by WRITING YOUR INSTRUCTION CODE in Assembly language. 1. Modify the Lab 4 Tutorial 1 to allow USERS TO ENTER the following parameter and displaythefinal result. You are also required to store the results in the memory named ‘output’. Findthesum of the last four numbers in the array. For example, assume the value of n is 10, the sumwillbe 10+9+8+7= 34 (in decimal). Your console should display the following:Please enter the value of n: 10The sum of the last four numbers is 34Thank you. Before computing the difference of the numbers in the array, your code must performachecking; if n < 3, you should display a message ‘The value of n is less than 4’, and no operationwill be performed. In this case, your console should display the following:               Please enter the value of n: 1 The entered n is less than 3. Thank you                                                                                                                              Type the…
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Text book image
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Text book image
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Text book image
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Text book image
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Text book image
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY