Friday, November 24, 2023

The smallest integer that can be represented by an 8-bit number in 2's complement form is?


 

Answer:   -128

The range of numbers that can be represented by n-bits in 2’s complement form is

(-2)n-1 to (2n-1) -1

So, the smallest number is (-2)n-1  à (-2)8-1 à (-2)7  = -128

The largest number is (2n-1) – 1 à (27) – 1 = 127

0 comments:

Post a Comment

Data Structures with C++



NET/SET/CS PG



Operating Systems



Computer Networks



JAVA



Design and Analysis of Algorithms



Programming in C++

Top