Digital Principles and Computer Organization: Chapter 1: Fundamentals of Digital Systems and Arithmetic

Signed Numbers and Complements

1. Signed-Magnitude Representation, 2. 1's Complement Representation, 3. 2's Complement Representation. Questions: 1. What are 1's complement and 2's complement numbers? 2. State advantages of 2's complement number representation. 3. What are the different ways to represent a negative number ? 4. State the different ways for representing the signed binary numbers.

Signed Numbers and Complements

• In arithmetic, we often need to represent both positive and negative numbers. In everyday notation, we use the symbols "+" and "–" to indicate the sign of a number. For example, +25 and –25. However, in computers, numbers are stored and processed only in the form of binary digits (0s and 1s). To represent negative numbers, special binary coding schemes are used. These are known as signed number representations.

• The leftmost bit in a signed binary number is called the sign bit :

■  0 → positive number

■  1 → negative number

• The remaining bits represent the magnitude of the number.

 

1. Signed–Magnitude Representation

• The most straightforward method.

• The MSB (Most Significant Bit) represents the sign and the remaining bits represent the magnitude.

• Fig. 1.4.1 shows the signed magnitude format for 8–bit signed numbers.


• Here are some examples of sign–magnitude numbers.

1.  + 6   = 0000 0110

2.  – 14 = 1000 1110

3.  + 24 = 0001 1000

4.  – 64   = 1100 0000


Example: 1

A binary machine handles negative numbers in the true magnitude form. How will – 4 be stored in a register with a sign bit and 4 bits representing magnitude?

Solution :


 

2. 1's Complement Representation

• The 1's complement of a binary number is the number that results when we change all 1's to zeros and the zeros to ones.

Example: 1

Find 1's complement of (11010100)2.

Solution :


 

3. 2's Complement Representation

• The 2's complement is the binary number that results when we add 1 to the 1's complement. It is given as,

2's complement = 1's complement + 1

Example: 2

Find 2's complement of (11000100)2.

Solution :


Example: 3

Represent the decimal number – 200 and 200 using 2's complement binary form.

Solution :

To represent 200 and – 200 we need 9–bit number system.


• Table 1.4.1 shows 4–bit signed number table showing Signed–Magnitude, 1's Complement and 2's Complement representations for decimal numbers from –7 to +7.


Advantages of 2's complement numbers

1. Only one representation of zero.

2. Simplifies arithmetic operations since subtraction can be carried out as addition.

3. The most common system used in computer arithmetic.

 

Review Questions

1. What are 1's complement and 2's complement numbers?

2. State advantages of 2's complement number representation.

3. What are the different ways to represent a negative number ?

4. State the different ways for representing the signed binary numbers.

 

Digital Principles and Computer Organization: Chapter 1: Fundamentals of Digital Systems and Arithmetic : Tag: Digital, Computer : - Signed Numbers and Complements


Digital Principles and Computer Organization: Chapter 1: Fundamentals of Digital Systems and Arithmetic



Under Subject


Digital Principles and Computer Organization

CS25C06 2nd Semester AIDS, CSE, IT, CSE(CY) Dept | 2025 Regulation | 2nd Semester 2025 Regulation



Related Subjects


English Essentials II

EN25C02 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation



Linear Algebra

MA25C02 2nd Semester | 2025 Regulation


Applied Physics (CSIE) II

PH25C03 2nd Semester AIDS, CSE, IT, CSE(CY) Dept | 2025 Regulation | 2nd Semester 2025 Regulation


Digital Principles and Computer Organization

CS25C06 2nd Semester AIDS, CSE, IT, CSE(CY) Dept | 2025 Regulation | 2nd Semester 2025 Regulation


Basic Electrical and Electronics Engineering

EE25C01 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation


Python for Data Science

AD25201 2nd Semester AIDS Dept | 2025 Regulation | 2nd Semester 2025 Regulation


Re-Engineering for Innovation

ME25C05 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation


Python for Data Science - Laboratory

AD25201 2nd Semester AIDS Dept | 2025 Regulation | 2nd Semester 2025 Regulation