Binary Representation of Integers

AS we already know Binary number can be represented only by using 0’s and 1’s, but can not use the sign (-) to denote the negative number or sign (+) to denote the positive number. So it must be either 0 or 1. There are three methods to represent binary number. They are

Sign and magnitude method

One’s complement method

Two’s complement method

Sign and magnitude method
In this method, first bit is considered as a sign bit. Here positive number starts with 0
and negative number starts with 1.

Example
25
25/2 = 12 1
12/2 = 6 0
6/2 = 3 0
3/2 = 1 1
1/2 = 0 1
So the binary number is (11001)2. If we take the size of the word is 1 byte, then the number 25 will be represented as
00011001 Suppose, if the number is -25, and then it will be represented as 10011001

One’s Complement Method
In this method, the positive number is represented as same as the binary number. If the number is negative, then we need to find one’s complement of a binary number. The one’s complement of a binary number will replace every 0 with 1 and vice- versa.

Two’s Complement method
In this method, the positive number is represented as the binary number. If the number is negative, then we need to calculate two’s complement of a binary number. The two’s complement of a binary number is calculated by adding 1 to its one’s complement.

ABOUT US - Team Behind This Plateform

We Are Engineering Graduate ,Tutor and Technology lover, Our Primary Main Area of interest is Computer Science And Electronics & Communication Technology

We are trying to make all those topics more simple and easy to understand,So that it will help students to learn it very quickly in limited amount of time like Last Peak hours of their Extermination,its like last time revision Notes. we also have provided the depth knowledge of some topics which really require more words to explain.

Other Area of this online platform contains "Online MCQ based Tests / Multiple choice Questions" ,Which can Helps readers to crack Various competitive Exams

Computer subject become necessary for all the students from various branches, and this plateform will provide them all the required knowledge to answer the Questions correctly in the various competative exams