Two’s complement can be used to represent positive and negative integers - Scottish Highers Computing Science - Question 1 - 2022
Question 1
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
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
In a 32-bit two’s complement representation, the minimum denary value is calculated as:
−231
Thus, the minimum value is -2,147,483,648.
Step 2
State the maximum denary value
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The maximum denary value in a 32-bit two’s complement representation can be calculated as:
231−1
Thus, the maximum value is 2,147,483,647.
Join the Scottish Highers students using SimpleStudy...