Photo AI

Two’s complement can be used to represent positive and negative integers - Scottish Highers Computing Science - Question 1 - 2022

Question icon

Question 1

Two’s-complement-can-be-used-to-represent-positive-and-negative-integers-Scottish Highers Computing Science-Question 1-2022.png

Two’s complement can be used to represent positive and negative integers. State the range of denary values that can be represented using 32-bit two’s complement.

Worked Solution & Example Answer:Two’s complement can be used to represent positive and negative integers - Scottish Highers Computing Science - Question 1 - 2022

Step 1

State the minimum denary value

96%

114 rated

Answer

In a 32-bit two’s complement representation, the minimum denary value is calculated as:

231-2^{31}

Thus, the minimum value is -2,147,483,648.

Step 2

State the maximum denary value

99%

104 rated

Answer

The maximum denary value in a 32-bit two’s complement representation can be calculated as:

23112^{31} - 1

Thus, the maximum value is 2,147,483,647.

Join the Scottish Highers students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;