Number systems

Number systems Digital Circuits GATE 2017 


Full PDF: Number systems



Video Lecture on Number systems Digital Circuits GATE 2017 





Number Systems and Codes (Notes)
This is the first topic of Digital circuits. Its importance in digital circuits and systems needs to be seen.
Number systems and codes are widely used in digital systems like microprocessors, logic circuits, computers etc. This knowledge also helps in understanding, analyzing and designing digital systems.
Positional Number Systems:
Number systems use positional notation to represent value .In decimal the units, tens, hundreds and so forth indicate value not indicated by the character (0 through 9)
The decimal number system (0,1,2,………9) is commonly used even though there are many other number systems like binary, octal, hexadecimal etc. It is possible to express the number in any base (or radix). In binary system base is 2. The digital circuits operate with binary numbers. In general a number expressed in base-r has coefficients multiplied by power of r
an rn + an-1 rn-1 + —— a2 r2 + a1 r + a0 + a-1 r-1 + a-2 r-2 + ——- a-m r-m
Coefficients aj range from 0 to (r-1).
Coefficients an is most significant digit (MSD) and a-m is  termed as least significant digit (LSD).
Binary number system has base 2. (i.e. two different digits like 0 or 1).
Other number system are octal (base 8) hexadecimal (base 16), which are very common in use with microprocessor
Number with other bases like 3,4,5… etc. are also possible but not very common .Table given at the end of this note gives several bases and the numerals used in the respective set.
Counting in Base r: This can best be illustrated through examples.
Example 1: Decimal counting
We count 0,1,2,……..9 until last character 9 is reached. Then carry from 100 (unit) position to 101 (tens) position occurs.
So, it is 0,1,2,3,——-9,10,11,12,—-
Example 2: Binary counting from 0 to (3)10 is 00, 01, 10, 11.
Binary digit is called a bit.
Example 3: Counting 0 to (12)10 in radix 5.
00, 01, 02, 03, 04, 10, 11, 12, 13, 14, 20, 21, 22—-
You can verify the value of (22)5 into decimal as
2 x 51 + 2 x 50 = 10 + 2 = (12)10
Although digital systems use binary numbers they are difficult to work as they require 3 to 4 times as many digits in decimal. So octal or hexadecimal numbers are used to enter the binary data to avoid error.
Example: A binary string (1111 1111) can be entered in Hex as FF.
Conversions from any number system to decimal and from decimal to other systems which are very well known and are readily available in books some of the related problems have been included in the MCQs.
Conversion from decimal to any radix:
The conversion of decimal numbers to any other radix applies to successive division for integer part and successive multiplication to fractional part.
Conversion from any radix to Decimal:
This conversion is accomplished by applying the equation to radix being converted.
We have observed that most of the problems that appeared in GATE exam are from binary arithmetic and more specific is 2’s complement arithmetic. This will be discussed in details through examples.
2’s complement arithmetic
Digital circuits are used to perform binary arithmetic operations.
If it is possible to perform binary subtraction also using addition it will simplify digital circuits. 2’s complement method is mostly used.
Complements are very useful in arithmetic manipulations
• 1’s complement is used in logical manipulations.
• 2’s complement is used in conjunction with arithmetic applications
An elaborate method for all possible combinations of addition/subtraction are considered in MCQs moderate type. Please refer for details on our website.
A table giving comparison of 1’s and 2’s complement arithmetic is given at the end of this note.
Binary Codes
A code is a symbol or group of symbol the stand for something. Binary bits are often used in groups to stand for things such as decimal or alphabetic character.
In a good number of applications where a person interacts digital system requires that binary information may be encoded such that it can be easily translated into decimal. A code in developed where a group of 4 digits (bits) represent single decimal digit. The information processed in digital system is in binary, but the result can be displayed in decimal form using BCD code.
Simple example will illustrate the procedure
Ex. Convert (9275.6)10 into BCD.
Represent each digit by its 4 bit BCD value
9 = 1001, 2 = 0010, 7 = 011, 5 = 0101, 6 = 0110
So, (92756)10 = 1001, 0010, 0111, 0101. 0110 in BCD
Note: BCD code needs more bits to represent than straight binary, since BCD digit takes four bits encoding.
Many BCD codes exist but natural BCD code is the most widely used.
Other codes are
8421, Ex-3, 7421, 5311, 5421, e.tc
Self- Complementing codes:
These are the codes whose arithmetic and logic complements are same.
Two arithmetic complements are
(i) Radix r
(ii) Diminishing radix (r-1)
Ex 10’s complement of 610 is
10 – 6 = 410
Diminishing radix (9’s complement)
610 is (10 – 1) – 6 = 310
In binary the logical complement of 0 is 1 and of 1 is 0.
BCD codes are often used in digital system that perform decimal arithmetic. Self- complementing BCD codes are designed so that arithmetic diminishing complement can be found by taking logical complement.
Unit distance codes:
Other binary codes are used to input data from transducers measuring physical parameters. It is desirable to have these codes to behave so that only one bit can change between successive values, to avoid error.
Gray codes are used as a shaft position encoder. Conversion of gray code to binary & vice versa is shown in MCQs [easy] on website
Alphanumeric codes
Digital computers need data other than numbers also to be encoded such as alphabet and punctuation.
Most common alphanumeric codes are seven and 8 bit ASCII codes. Seven bit ASCII encoded all upper & lower case alphabet letters, numbers, punctuation & control information.
8 bit ASCII is extended to include some additional graphic symbols.
Another alphanumeric code is EBCDIC code (extended BCD interchange code)
Complement codes:
2’s and 1’s complement codes (binary radix and diminishing radix) are 2’s and 1’s complement codes.
MSB is used to represent sign of the code
Comparison of 1’s 2’s complement addition/subtraction
S. No1’s complement2’s complement
1.Easier to complement but requires two steps in subtraction (inversion and add 1)Requires only one step
2.Possesses two arithmetic zeroOnly one zero
3.Good for logical operationsGood for arithmetic operation
Bases and character set 
Here r is radix or base of a number system. Table gives bases and numerals used.
    Radix (Base)    Character set
    2 (binary)    (0,1)
    3    (0,1,2)
    4    (0,1,2,3)
    5    (0,1,2,3,4)
......
    8 ( octal)    (0,1,2,3,4,5,6,7)
......
    10  (decimal)    (0,1,2,3,4,5,6,7,8,9)
......
    16 ( hexadecimal)    (0, 1,2,———9, A,B,C,D,E,F)

Previous GATE Questions on Number Systems & Subtraction using 2's Complement Method (1987 to 2017)


1987

1.       The subtraction of a binary number Y from another binary number X, done by adding 2’s compliment of Y to X, results in a binary number without overflow. This implies that the result is
                        a.       Negative and is in normal form
                        b.      Negative an is in 2’s compliment form
                        c.       Positive and is in normal form
                        d.      Positive and is in 2’s compliment form
Answer:     B
                           Solution :    https://www.youtube.com/watch?v=SMBnnJJrDDE




1993

1.       2’s complement representation of a 16 bit number (one sign bit and 15 magnitude bits) is FFFF. Its magnitude in decimal representation is
                        a.       0
                        b.      1
                        c.       32,767
                        d.      65,535
Answer:    B
                        Solution :  https://www.youtube.com/watch?v=4ZrEe07cDuQ





1998

1.       An equivalent 2’s complement representation of the 2’s complement number is 1101 is
                        a.       110100
                        b.      001101
                        c.       110111
                        d.      111101
Answer:    D
                 Solution :      https://www.youtube.com/watch?v=BH31RXqm9Fg    





2.       Two 2’s complement numbers having sign bits x and y are added and the sign bit of the result is z. Then, the occurrence of overflow is indicated by the Boolean function
                Answer:    C
                 Solution :    https://www.youtube.com/watch?v=gFp7C8uuwPM      




2001

1.       The 2’s complement representation of – 17  is
                        a.       01110
                        b.      101111
                        c.       11110
                        d.      10001
Answer:    B
                Solution :   https://www.youtube.com/watch?v=6SQjwYET7cM   



2002

1.       4 – bit 2’s complement representation of a decimal number is 1000. The number is
                        a.       +8
                        b.      0
                        c.       -7
                        d.      -8
  Answer:    D
                 Solution :   https://www.youtube.com/watch?v=cZVj5TPGuWo 



2004
1.       The range of signed decimal numbers that can be represented by 6 bit 1’s complement form is
                        a.       -31 to +31
                        b.      -63 to +64
                        c.       -64 to +63
                        d.      -32 to +31
Answer:    A
                  Solution :  https://www.youtube.com/watch?v=0mvda9-_j6Y


2.       11001, 1001 and 111001 correspond to the 2’s complement representation of which one of the following sets of number?
                        a.       25, 9 and 57 respectively 
                        b.      -6, -6 and -6 respectively
                        c.       -7, -7 and -7 respectively
                        d.      -25, -9 and -57 respectively
Answer:    C
                  Solution :  https://www.youtube.com/watch?v=prvoIVvnID4



2005

1.       Decimal 43 in Hexadecimal and BCD number system is respectively
                        a.       B2, 0100 0011
                        b.      2B, 0100 0011
                        c.       2B, 0011 0100
                        d.      B2, 0100 0100
Answer:    B
                  Solution :  https://www.youtube.com/watch?v=5-6JKj9bNzI



2006

1.       A new Binary Coded Pentary (BCP) number system is proposed in which every digit of a base-5 number is represented by its corresponding 3-bit binary code. For example, the base-5 number 24 will be represented by its BCP code 010100. In this number system, the BCP code 100010011001 corresponds to the following number in base-5 system
                        a.       423
                        b.      1324
                        c.       2201
                        d.      4231
Answer:    D
                Solution :    https://www.youtube.com/watch?v=9zxiQtnzEH0 



2007

1.       X = 01110 and Y = 11001 are two 5 bit binary numbers represented in 2’s compliement format. The sum of X and Y represented in 2’s compliment format using 6 bits is
                        a.       100111
                        b.      001000
                        c.       000111
                        d.      101001
Answer:    C
               Solution :   https://www.youtube.com/watch?v=BzttyDg5Psk



2008

1.       The two numbers represented in signed 2’s compliment form are P = 11101101 and Q = 11100110. If Q is subtracted from P, the value obtained in signed 2’s compliment form is
                        a.       100000111
                        b.      00000111
                        c.       11111001
                        d.      111111001
Answer:    B
               Solution :   https://www.youtube.com/watch?v=blIZILSmO8o



2014 (from all 4 sets)

1.       The number of bytes required to represent the decimal number 1856357 in packed BCD (Binary Coded Decimal) form is ………….
Answer:    4
                Solution :  https://www.youtube.com/watch?v=xAqo_3bT9fI


Handwritten Notes for Digital Circuits GATE 2017: Digital Circuits


Comments

Popular posts from this blog

Top 16 Mobile App Development Companies in India | App Developers 2017

CCEE CDAC Exam Questions

Important JavaScript Question Answers