Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. [Ref: 82.2 of the Chapter 2 lecture notes - Representing Unsigned Integers] Background: The word size of a microprocessor is a term that refers

image text in transcribed

4. [Ref: 82.2 of the Chapter 2 lecture notes - Representing Unsigned Integers] Background: The word size of a microprocessor is a term that refers to the number of bits, n, that are used in vari- ous places of the computing system, e.g., the sizes of the general-purpose registers, the width of the data bus, and pos- sibly the width of the address bus as well. Also, in a high-level language like C or C++, if the word size of a processor is n-bits, integer values of the data types int/signed int and unsigned int will also be represented in n-bits (henceforth, understand that in C, the int and signed int data types are interchangeable, so we will just use the term int here to represent both int and signed int). In modern computing systems, n is always a power of 2 and is also a power of 8, so common microprocessor word sizes are 8-bits, 16-bits, 32-bits, 64-bits, and 128-bits. For this exercise, suppose the word size of our microprocessor is n = 16-bits. (a) Suppose the C statement unsigned int x = 7183; is executed. What is the 16-bit binary value that stored in the memory location associated with variable x? Enter 16-bits (i.e., 16 1's and O's) for the answer in Canvas, even if one or more of the most-significant bits are O's. (b) In the C programming language, the C Standard Library contains a file which defines a constant which specifies the minimum value, in decimal, of an n-bit unsigned int. Let us call this constant UINT_MIN. What would be the decimal value of UINT_MIN for a C compiler designed to run on our 16-bit microprocessor system? (c) Similarly, the C library defines a constant which specifies the maximum value, in decimal, of an n-bit unsigned int. Let us call this constant UINT_MAX. What would be the decimal value of UINT_MAX

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

What are some global issues confronting women?

Answered: 1 week ago