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

4. [Ref: $2.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 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? 4. [Ref: $2.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 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
Get step-by-step solutions from verified subject matter experts
