Computer engineering !!

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Computer engineering !!
Many people confuse numbers and their representation. A common question
beginning assembly language students ask is, "“I have a binary number in the
EAX register; how do I convert that to a hexadecimal number in the EAX
register?" The answer is, "You don't." Although a strong argument could be
made that numbers in memory or in registers are represented in binary, it's
best to view values in memory or in a register as abstract numeric quantities.
Strings of symbols like 128, $80, or %1000_0000 are not different numbers;
they are simply different representations for the same abstract quantity that
we refer to as “one hundred twenty-eight." Inside the computer, a number is
a number regardless of representation; the only time representation matters
is when you input or output the value in a human-readable form.
Human-readable forms of numeric quantities are always strings of
characters. To print the value 128 in human-readable form, you must convert
the numeric value 128 to the three-character sequence 1 followed by 2
followed by 8. This would provide the decimal representation of the numeric
quantity. If you prefer, you could convert the numeric value 128 to the three-
character sequence $80. It's the same number, but we've converted it to a
different sequence of characters because (presumably) we wanted to view the
number using hexadecimal representation rather than decimal. Likewise, if
we want to see the number in binary, then we must convert this numeric
value to a string containing a 1 followed by seven Os.
By default, HLA displays all byte, word, dword, qword, and lword variables
using the hexadecimal numbering system when using the stdout.put routine.
Likewise, HLA's stdout.put routine will display all register values in hexa-
decimal form. Consider the program in Listing 2-1, which converts values
input as decimal numbers to their hexadecimal equivalents.
Transcribed Image Text:Many people confuse numbers and their representation. A common question beginning assembly language students ask is, "“I have a binary number in the EAX register; how do I convert that to a hexadecimal number in the EAX register?" The answer is, "You don't." Although a strong argument could be made that numbers in memory or in registers are represented in binary, it's best to view values in memory or in a register as abstract numeric quantities. Strings of symbols like 128, $80, or %1000_0000 are not different numbers; they are simply different representations for the same abstract quantity that we refer to as “one hundred twenty-eight." Inside the computer, a number is a number regardless of representation; the only time representation matters is when you input or output the value in a human-readable form. Human-readable forms of numeric quantities are always strings of characters. To print the value 128 in human-readable form, you must convert the numeric value 128 to the three-character sequence 1 followed by 2 followed by 8. This would provide the decimal representation of the numeric quantity. If you prefer, you could convert the numeric value 128 to the three- character sequence $80. It's the same number, but we've converted it to a different sequence of characters because (presumably) we wanted to view the number using hexadecimal representation rather than decimal. Likewise, if we want to see the number in binary, then we must convert this numeric value to a string containing a 1 followed by seven Os. By default, HLA displays all byte, word, dword, qword, and lword variables using the hexadecimal numbering system when using the stdout.put routine. Likewise, HLA's stdout.put routine will display all register values in hexa- decimal form. Consider the program in Listing 2-1, which converts values input as decimal numbers to their hexadecimal equivalents.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY