Range of Negative Numbers in Different Representations || Lesson 16 || Digital Electronics ||

  Рет қаралды 2,581

Learning Monkey

Learning Monkey

Күн бұрын

Here we will try to understand Range of Negative Numbers in Different Representations.
Here is the discussion on how Negative Numbers or Signed Numbers are represented.
To have a better understanding we will consider a 4-bit number.
The image of the four-bit register is as shown below which has MSB for sign bit representation and remaining 3 bits for the magnitude of the number.
The table below shows the possible numbers with 4 bits.
In the above diagram, MSB is used for sign bit and the remaining three bits are used for the magnitude of the binary number.
Range of Negative Numbers in Different Representations
In the Sign Magnitude method, an additional bit called sign bit is placed in front of the number.
The magnitude of the number is represented in its true binary form.
If the sign bit is 0, the number is positive.
If the sign bit is 1, the number is negative.
The Range of numbers possible with four bits in sign-magnitude representation is from -7 to +7 as shown in the image below.
In sign-magnitude representation, 1 000 is used to represent -0 which is not desirable.
In 1's Complement Method, if the number is positive the magnitude is represented in its true binary form and the sign bit is placed with 0.
If the number is negative, the magnitude of the number is represented in its 1's complement form and the sign bit is placed with 1.
For example, 0 001 is the binary representation of 1 in 1's complement representation.
To represent -1 in 1's complement representation we have to take the 1's complement 001 and the sign bit has to be placed with 1.
The -1 is represented by 1 110.
The table below shows how 1 and -1 are represented in 1's complement representation.
Similarly, we can find the range of numbers represented in 1's complement method for 4 bits is as shown below.
In 1's complement representation, 1 111 is used to represent -0 which is not desirable.
In 2's Complement Method, if the number is positive the magnitude is represented in its true binary form and the sign bit is placed with 0.
If the number is negative, the magnitude of the number is represented in its 2's complement form and the sign bit is placed with 1.
For example, 0 001 is the binary representation of 1 in 2's complement representation.
To represent -1 in 2's complement representation we have to take the 2's complement 001 and the sign bit has to be placed with 1.
The -1 is represented by 1 111.
The table below shows how 1 and -1 are represented in 1's complement representation.
Similarly, we can find the range of numbers represented in 2's complement method for 4 bits is as shown below.
In 2's complement representation there is no separate representation for -0.
Whereas in sign-magnitude and 1's complement we have separate representation for -0.
In 2's complement, we have the representation for -8, this made the 2's complement representation to be widely used in modern computers.
The table below shows the range of numbers represented in Sign-magnitude, 1's Complement, and 2's Complement for 4-bits.
How to generalize the range for any bit size?
For sign-magnitude with 4-bits, the range is from - 24-1 -1 to 2 4-1 -1.
Which is from -7 to 7.
For 1's complement with 4-bits, the range is from - 24-1 -1 to 2 4-1 -1.
Which is from -7 to 7.
For sign-magnitude with 4-bits, the range is from - 24-1 to 2 4-1 -1.
Which is from -8 to 7.
The generalized range for n bit in sign-magnitude representation is - 2n-1 -1 to 2 n-1 -1.
The generalized range for n bit in 1's complement representation is - 2n-1 -1 to 2 n-1 -1.
The generalized range for n bit in 2's complement representation is - 2n-1 to 2 n-1 -1.
Link for playlists:
/ @learningmonkey
Link for our website: learningmonkey.in
Follow us on Facebook @ / learningmonkey
Follow us on Instagram @ / learningmonkey1
Follow us on Twitter @ / _learningmonkey
Mail us @ learningmonkey01@gmail.com

Пікірлер: 9
@sahu_SuMiT
@sahu_SuMiT Жыл бұрын
awesomw sir you are just amazing
@SHERIFWEMEGAH
@SHERIFWEMEGAH Жыл бұрын
I think there is an issue with the range I got -9 to 7 for the 2s complement because 2 to the power 3 is 8, -8 plus -1 is -9
@sortinghat
@sortinghat 5 күн бұрын
sir i think we cannot represent 1000 as -8 in 4 bits ? i di not get that the last part 10:35
@LearningMonkey
@LearningMonkey 5 күн бұрын
Positive numbers can be represented 0 to 7 Negative from -1 to -8. 1000 is 8 2's complement of 1000 is 1000 so -8
@sortinghat
@sortinghat 5 күн бұрын
@LearningMonkey sir so how can we represent +8.
@sortinghat
@sortinghat 5 күн бұрын
We have to take next 4 bits for that right??
@LearningMonkey
@LearningMonkey 5 күн бұрын
With 5 bits we can represent +8
@explore5174
@explore5174 4 жыл бұрын
What is an unsigned bit in 4bit data how we say it as unsigned bit?
@LearningMonkey
@LearningMonkey 4 жыл бұрын
Hi, The most significant bit is the bit that represents the signed or unsigned bit. If the value in the most significant bit is 0 then it is an positive number. If it is 1 then it is negative number.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Twos complement: Negative numbers in binary
13:49
Ben Eater
Рет қаралды 1,2 МЛН
Binary Addition and Subtraction With Negative Numbers, 2's Complements & Signed Magnitude
24:57
What is 0 to the power of 0?
14:22
Eddie Woo
Рет қаралды 10 МЛН
Bayes theorem, the geometry of changing beliefs
15:11
3Blue1Brown
Рет қаралды 4,6 МЛН