Number System Study Notes for GATE & Computer Science Engineering Exams
By BYJU'S Exam Prep
Updated on: September 25th, 2023
Are you preparing for the GATE or Computer Science Engineering exams? Gain a strong foundation in the essential topic of the Number System with our comprehensive study notes. In these study materials, we delve deep into the intricacies of the Number System, equipping you with the knowledge and skills necessary to excel in your exams.
Our Number System Study Notes are meticulously crafted to cater specifically to the needs of GATE and Computer Science Engineering aspirants. Understanding the Number System is crucial for a variety of topics in computer science, such as data representation, digital logic design, and algorithms. With our study notes, you will grasp the core concepts of binary, decimal, octal, and hexadecimal systems, enabling you to tackle complex problems with ease. Whether you are a beginner or seeking to strengthen your existing knowledge, our study notes will empower you to master the intricacies of the Number System and confidently tackle exam questions.
Download Formulas for GATE Computer Science Engineering – Computer Networks
Table of content
 1. Introduction to Number Systems
 2. Weighted Binary System
 3. Sequential Code
 4. Nonweighted Codes
 5. Reflective Code
 6. BCD (Binary Coded Decimal)
 7. Complements
 8. Signed Magnitude Method
 9. 1’s Complement Method
 10. 2’s Complement Method
 11. Detailed GATE CSE 2024 Champion Study Plan
 12. Click Here to Avail GATE CSE Test Series!
Introduction to Number Systems
In the world of computer science, understanding number systems is fundamental. From binary to hexadecimal, number systems play a crucial role in data representation, digital logic design, and algorithmic operations. Whether you’re preparing for the GATE or Computer Science Engineering exams, this comprehensive guide will equip you with the knowledge and skills to tackle number systemrelated questions with confidence.

The Basics of Number Systems: Dive into the fundamentals of number systems, including the decimal system, binary system, octal system, and hexadecimal system. Learn how to convert between different number systems and gain a solid understanding of their unique properties.

Binary System Unraveled: Explore the binary number system indepth, which lies at the heart of computer systems. Understand binary arithmetic, logical operations, and binarycoded representations. Master the art of bitwise operations and binary manipulation for efficient computing.

Octal and Hexadecimal Systems: Delve into the octal and hexadecimal number systems, which offer compact representations of binary numbers. Discover their significance in computer memory, addressing schemes, and digital logic circuits. Learn conversion techniques and how to apply these systems effectively.

Number Systems in Data Representation: Learn how number systems are used to represent various data types, such as integers, floatingpoint numbers, and characters. Understand the principles of signed and unsigned number representations, as well as the impact on arithmetic operations and data storage.

Number Systems and Algorithms: Gain insights into how number systems intersect with algorithm design and analysis. Explore topics like number theory, modular arithmetic, and prime numbers, and understand their implications for cryptographic algorithms and data encryption.
Download Formulas for GATE Computer Science Engineering – Theory of Computation
 The base or radix of a number system is the number of digits present. The decimal numeral system has a base or radix of 10, where the set of 10 symbols (digits) is {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. The weights are in powers of ten.
 In general, a basesb number (an an1 … a0 . f1 f2 … fm)b has the value
 (an × bn) + (an1 ×bn1) +…+ (a0 × b0) + (f1 × b1) + (f2 × b2) +…+ (fm × bm)
Weighted Binary System
These binary codes are those which follow the positional weighting principle, In which each position of a number represents a specific weight.
e.g., 8421, 2421, 5421
Sequential Code
A code is said to be sequential when two subsequent codes, seen as numbers in binary representation, differ by one. The 8421 and excess3 codes are sequential, whereas the 2421 and 5421 codes are not.
Nonweighted Codes
Nonweighted codes are codes which are not positionally weighted. That is each position within the binary number isn’t assigned a hard and fast value, Example: Gray Code
Reflective Code
A code is said to be reflective when a code for 9 may be a complement for the code for 0 and so is for 8 and 1 codes, 7 and 2, 6 and 3, and 5 and 4. Codes 2421, 5421 and excess3 are reflective, whereas the 8421 code is not.
BCD (Binary Coded Decimal)
It is a direct assignment of the binary equivalent. Thus encode a decimal number using the common BCD encoding. Each digit is stored during a a4bit number
BCD encoding for number 127 would be
1 2 7
(0001 0010 0111) → BCD equivalent of 127
whereas the pure binary number would be (01111111)2
BCD
Add (148 + 157) = ?
When the sum of two digits is bigger than or adequate to9, then we’d like to feature then we’d like to feature6 i.e., 0110
Download Formulas for GATE Computer Science Engineering – Compiler Design
2421 Code
This is often weighted code, its weights are 2, 4, 2 and 1. A decimal number is represented in 4bit form and therefore the total 4 bits weight is 2 + 4 + 2 + 1 = 9.
Hence, the 2421 code represents the decimal numbers which are from 0 to 9.
Excess3 Code
Excess3 code is a nonweighted code usually used to represent decimal numbers. The code receives its name from the fact that each binary code is the correspondence of 8421 code plus 0011 (3).
e.g.,
Gray Code
This is variable, weighted code and is cyclic in nature. This means that it is arranged in order so that every transition from one value to the next value involves only a onebit Change.
Binary to Gray Code Conversion
 Write down the number in binary codes.
 The Most Significant Bit (MSB) of the grey code will be the same as the MSB of binary code.
 Perform XOR operation on MSB and next bit to the MSB in the binary number.
 Repeat step 3 till all bits of binary number have been XO Red, the resultant code is the grey code equivalent to binary code.
Gray Code to Binary Conversion
 Start with the MSB of grey coded number.
 Copy this bit as the MSB of the binary number.
 Now, perform the ExOR operation of this bit with the next bit of the binary number.
 Repeat step 3 till all bits of grey coded number have been used in the XOR operation. The resultant number is the binary equivalent of the grey number.
Complements
Complements are used in the digital computer system for simplifying the subtraction operation and for logical manipulation.
>>types of complements for each base r system as,
 The r′ s complement.
 The (r′ – 1)′s complement.
The r’s Complement
Here given no is a positive number N with base r with an integer part of n digits. The r’s complement of N is given as rn – N for N ≠ 0 and 0 for N = 0.
e.g., 10’s complement of (25.639)10 is (102 – 25.639)
100 – 25.639 = 74.361, here the number of digits in the integer part is 2
means n = 2
The (r – 1)′s Complement
Given, a positive number N with base r with an integer part of n digits and a fraction part of m digits, the (r – 1)’s complement of N is derived as rn – r–m – N.
 9’s complement of (52520)10 is (105 – 1 – 52520)
= 99999 – 52520 = 47479
Because the number of integer parts is 5, so rn = 105 and no fractional part is
Present’ so r–m = 10–0 = 1  9’s complement of (0.3267)10 is (100 – 10–4 – 0.3267)
= 1 – 0.0001 – 0.3267
= 0.9999 – 0.3267 = 0.6732
No integer part, so 10n = 100 = 1  1’s complement of (101100)2 is (26 – 20)10 – (101100)2
= (64 – 1)10 – (101100)2
= (63)10 = (101100)2
= 111111 – 101100 = 010011
Key Points
 520 → Here, n = 3, but (052) → here n = 2.
 In the latter example, 0 is of no significance.
Representation of Integers
The are three possible ways to represent a number
 Signed magnitude method
 1’s complement method
 2’s complement method
Signed Magnitude Method
The number is divided into two parts, one is the sign bit and the other part for magnitude, In the example we are using the 5bit register to represent –6 and +6.
Range of Number For the n bit register, MSB will be a sign bit and (n – 1) bits will be the magnitude.
Key Points
 The drawback of the signed magnitude method is that 0 will be having 2 different representations one will be 10000 i.e., –0 and the other one will be 00000 + 0.
1’s Complement Method
Positive numbers are represented in the same way as in the signmagnitude method. If the number is negative, then it is represented by the help of 1’s complement method. For this, we need to represent the number with a positive sign and then take its 1’s complement of this number.
e.g., Suppose we are using the 5bit register. The representation of –6 will be as below.
Key Points
 The only drawback of 1’s complement method is that there are two different representations for zero, one is –0 and the other is +0.
2’s Complement Method
Positive numbers are represented in the same way as in sign magnitude. For representing a negative number, we take 2’s complement of the corresponding positive number.
Properties of 2’s Complement
This representation usually uses binary arithmetic operations on signed integers, resulting in the current 2’s complement result.
 Positive Numbers Positive 2’s complement numbers are represented as the simple binary.
 Negative Numbers Negative 2’s complement numbers are represented as the binary number that when added to a positive number of the same magnitude equals zero.
You can follow the detailed champion study plan for GATE CS 2021 from the following link given below:
Detailed GATE CSE 2024 Champion Study Plan
Candidates can also practice 110+ Mock tests for exams like GATE, NIELIT, and ISRO with Test Series check the subsequent link:
Click Here to Avail GATE CSE Test Series!
Get complete information about the GATE exam pattern, cutoff, and all those related things on the BYJU’S Exam Prep official youtube channel.