The document provides information about different number systems used in computers, including binary, octal, hexadecimal, and decimal. It explains the characteristics of each system such as the base and digits used. Methods for converting between number systems like binary to decimal and vice versa are presented. Shortcut methods for direct conversions between binary, octal, and hexadecimal are also described. Binary arithmetic and binary-coded decimal number representation are discussed.
1. QnA
QUICK GUIDE
Decimal Number System
The number system that we use in our day-to-day life is the decimal number system. Decimal number system
has base 10 as it uses 10 digits from 0 to 9. In decimal number system, the successive positions to the left of the
decimal point represent units, tens, hundreds, thousands and so on.
Each position represents a specific power of the base (10). For example, the decimal number 1234 consists of
the digit 4 in the unit’s position, 3 in the tens position, 2 in the hundreds position, and 1 in the thousands
position, and its value can be written as:
(1x1000)+ (2x100) + (3x10)+ (4xl)
(1x103
)+ (2x102
) + (3x101
)+ (4xl00
)
1000 + 200 + 30 + 4
1234
123.45 = 1 x 102
+ 2 x 101
+ 3 x 100
+ 4 x 10-1
+ 5 x 10-2
As a computer programmer or an IT professional, you should understand the following number systems which
are frequently used in computers.
S.N. Number System and Description
1 Binary Number System Base 2. Digits used: 0, 1
2 Octal Number System Base 8. Digits used: 0 to 7
3 Hexadecimal Number System Base 16. Digits used: 0 to 9, Letters used: A- F
Binary Number System
Characteristics of binary number system are as follows
Uses two digits, 0 and 1.
Also called base 2 number system
Each position in a binary number represents a 0 power of the base (2). Example 20
Last position in a binary number represents a x power of the base (2). Example 2x
where x represents the last
position - 1.
Example
Binary Number: 101012
Calculating Decimal Equivalent:
Step Binary Number Decimal Number
Step 1 101012 ((1 x 24
) + (0 x 23
) + (1 x 22
) + (0 x 21
) + (1 x 20
)) 10
Step 2 101012 (16 + 0 + 4 + 0 + 1)10
Step 3 101012 2110
101.012 = 1 x 22
+ 0 x 21
+ 1 x 20
+ 0 x 2-1
+ 1 x 2-2
= 4 + 1 + 1/4 = 5.25
Octal Number System
Characteristics of octal number system are as follows
Uses eight digits, 0,1,2,3,4,5,6,7.
Also called base 8 number system
2. Each position in an octal number represents a 0 power of the base (8). Example 80
Last position in an octal number represents a x power of the base (8). Example 8x
where x represents the last position - 1.
Example
Octal Number: 125708
Calculating Decimal Equivalent:
Step Octal Number Decimal Number
Step 1 125708 ((1 x 84
) + (2 x 83
) + (5 x 82
) + (7 x 81
) + (0 x 80
)) 10
Step 2 125708 (4096 + 1024 + 320 + 56 + 0)10
Step 3 125708 549610
Note: 125708 is normally written as 12570.
Sample.
101.018 = 1 x 82
+ 0 x 81
+ 1 x 80
+ 0 x 8-1
+ 1 x 8-2
= 64 + 1 + 1/64 = 65.015625
Hexadecimal Number System
Characteristics of hexadecimal number system are as follows
Uses 10 digits and 6 letters, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
Letters represents numbers starting from 10. A = 10. B = 11, C = 12, D = 13, E = 14, F = 15.
Also called base 16 number system
Each position in a hexadecimal number represents a 0 power of the base (16). Example 160
Last position in a hexadecimal number represents a x power of the base (16). Example 16x where x represents
the last position - 1.
Example
Hexadecimal Number: 19FDE16
Calculating Decimal Equivalent:
Step Binary Number Decimal Number
Step 1 19FDE16 ((1 x 164
) + (9 x 163
) + (F x 162
) + (D x 161
) + (E x 160
)) 10
Step 2 19FDE16 ((1 x 164
)+(9 x 163
)+(15 x 162
)+(13 x 161
)+(14 x 160
)) 10
Step 3 19FDE16 (65536+ 36864 + 3840 + 208 + 14)10
Step 4 19FDE16 10646210
Note: 19FDE16 is normally written as 19FDE.
Sample
3F16 = 3 x 161
+ 15 x 160
= 48 + 15 = 63
Number Conversion
There are many methods or techniques which can be used to convert numbers from one base to another. We'll
demonstrate here the following
Decimal to Other Base System
Other Base System to Decimal
Other Base System to Non-Decimal
Shortcut method - Binary to Octal
Shortcut method - Octal to Binary
Shortcut method - Binary to Hexadecimal
Shortcut method - Hexadecimal to Binary
Decimal to Other Base System
Steps
Step 1 - Divide the decimal number to be converted by the value of the new base.
Step 2 - Get the remainder from Step 1 as the rightmost digit (least significant digit) of new base number.
Step 3 - Divide the quotient of the previous divide by the new base.
3. Step 4 - Record the remainder from Step 3 as the next digit (to the left) of the new base number.
Repeat Steps 3 and 4, getting remainders from right to left, until the quotient becomes zero in Step 3.
The last remainder thus obtained will be the most significant digit (MSD) of the new base number.
Example
Decimal Number: 2910
Calculating Binary Equivalent:
Step Operation Result Remainder
Step 1 29/2 14 1
Step 2 14/2 7 0
Step 3 7/2 3 1
Step 4 3/2 1 1
Step 5 1/2 0 1
As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so that the first
remainder becomes the least significant digit (LSD) and the last remainder becomes the most significant digit
(MSD).
Decimal Number: 2910 = Binary Number: 111012.
Other base system to Decimal System
Steps
Step 1 - Determine the column (positional) value of each digit (this depends on the position of the digit and the
base of the number system).
Step 2 - Multiply the obtained column values (in Step 1) by the digits in the corresponding columns.
Step 3 - Sum the products calculated in Step 2. The total is the equivalent value in decimal.
Example
Binary Number: 111012
Calculating Decimal Equivalent:
Step Binary Number Decimal Number
Step 1 111012 ((1 x 24
) + (1 x 23
) + (1 x 22
) + (0 x 21
) + (1 x 20
)) 10
Step 2 111012 (16 + 8 + 4 + 0 + 1)10
Step 3 111012 2910
Binary Number: 111012 = Decimal Number: 2910
Other Base System to Non-Decimal System
Steps
Step 1 - Convert the original number to a decimal number (base 10).
Step 2 - Convert the decimal number so obtained to the new base number.
Example
Octal Number: 258
Calculating Binary Equivalent:
Other Base System to Non-Decimal System
Steps
Step 1 - Convert the original number to a decimal number (base 10).
Step 2 - Convert the decimal number so obtained to the new base number.
Example
Octal Number: 258
4. Calculating Binary Equivalent:
Step1: Convert to Decimal
Step Octal Number Decimal Number
Step 1 258 ((2 x 81
) + (5 x 80
)) 10
Step 2 258 (16 + 5)10
Step 3 258 2110
Octal Number: 258 = Decimal Number: 2110
Step 2: Convert Decimal to Binary
Step Operation Result Remainder
Step 1 21/2 10 1
Step 2 10/2 5 0
Step 3 5/2 2 1
Step 4 2/2 1 0
Step 5 ½ 0 1
Decimal Number: 2110 = Binary Number: 101012
Octal Number: 258 = Binary Number: 101012
Shortcut method -Binary to Octal
Steps
Step 1 - Divide the binary digits into groups of three (starting from the right).
Step 2 - Convert each group of three binary digits to one octal digit.
Example
Binary Number: 101012
Calculating Octal Equivalent:
Step Binary Number Octal Number
Step 1 101012 010 101
Step 2 101012 28 58
Step 3 101012 258
Binary Number: 101012 = Octal Number: 258
Shortcut method -Octal to Binary
Steps
Step 1 - Convert each octal digit to a 3 digit binary number (the octal digits may be treated as decimal for this
conversion).
Step 2 - Combine all the resulting binary groups (of 3 digits each) into a single binary number.
Example
Octal Number: 258
Calculating Binary Equivalent
Step Octal Number Binary Number
Step 1 258 210 510
Step 2 258 0102 1012
Step 3 258 0101012
Octal Number: 258 = Binary Number: 101012
Shortcut method - Binary to Hexadecimal
Steps
Step 1 - Divide the binary digits into groups of four (starting from the right).
Step 2 - Convert each group of four binary digits to one hexadecimal symbol.
EXAMPLE
Binary Number: 101012
Calculating hexadecimal Equivalent
Step Binary Number Hexadecimal Number
Step 1 101012 0001 0101
Step 2 101012 110 510
Step 3 101012 1516
5. Binary Arithmetic
Arithmetic is usually done in binary in digital systems because such logic networks are easier to design.
The methods for binary addition, subtraction, multiplication, and division are the same as for decimal addition,
etc. except that everything is done in powers of 2.
Add 5 + 12 in binary:
11 -- Carries
00101 = 5
+01100 = 12
------
10001 = 17
Subtract 5 from 12 in binary:
111 -- Borrows
01100 = 12
-00101 = 5
------
00111
Multiply 13 by 5 in binary:
1101 = 13
x0101 = 5
-----
1101
0000
1101
------
1000001 = 65
Binary Codes for Decimal Numbers
Another number system that is encountered occasionally is Binary Coded Decimal. In this system, numbers are
represented in a decimal form, however each decimal digit is encoded using a four bit binary number.
For example: The decimal number 136 would be represented in BCD as follows:
136 = 0001 0011 0110 or 168 = 0001 0110 1110 0r 925 = 1100 0101 1000
1 3 6 1 6 8 9 2 5
A Binary-Coded-Decimal (BCD) is formed by replacing each decimal digit by its 4-bit binary equivalent:
342.61 --> 0011 0100 0010. 0110 0001
A 2421 code is a weighted code where the MSB has weight 2 and the LSB has weight 1. No illegal numbers
representable!
An Excess-3 code is the same as BCD + 3. Self-complementing!
925 --> 1100 0101 1000
Questions
Q-1. What is a general term used to describe raw facts?
Q-2. How is data represented?
Q-3. What were the first computers designed to manipulate in order to solve arithmetic problems?
Q-4. By what two means can the data contained on a source document be converted into a machine-readable
form for processing?
Q-5. What are some of the types of input media on which data may be indirectly entered?
Q-6. What does the acronym EBCDIC stand for?
Q-7. By using an 8-bit code, how many characters or bit combinations can be represented?
6. Q-8. What is the base of a hexadecimal number system?
Q-9. What term is used for the representation of two numeric characters stored in eight bits?
Q-10. What does the acronym ASCII mean?
Q-11. What was the purpose of several computer manufacturers cooperating to develop ASCII code for
processing and transmitting data?
Q-12. Are there any differences in the concepts and advantages of ASCII and EBCDIC?
Q-13. How is the parity bit in each storage location used?
A-14. Q-26. What is a file?
Q-15. What area in the computer's primary storage area holds the processing instructions (the program)?
Q-16. How are the boundaries determined for the separate areas of the computer's primary storage area?
Q-17. What is a bit?
Q-18. How many bits make up a byte?
Q-19. Primary storage capacities are usually specified in what unit of measure?
Q-20. How are core planes formed?
Q-21. Where are core planes used?
Q-22. Who designs and builds the storage capacity of an address into a computer?
Q-23. What is another name for computers designed to be character-oriented or character-addressable?
Q-24. Which computer has the faster calculating speeds, the variable-word-length or the fixed-word-length?
Q-25. What is the normal organization of data recorded on magnetic storage media?
Answers
A-1. Data.
A-2. By symbols.
A-3. Numbers.
A-4. By either direct or indirect means.
A-5. Punched cards, paper tape, magnetic tape, or magnetic disk.
A-6. Extended Binary Coded Decimal Interchange Code.
A-7. 256.
A-8. 16.
A-9. Packing or packed data.
A-10. American Standard Code for Information Interchange.
A-11. To standardize a binary code to give the computer user the capability of using several machines to process
data regardless of the manufacturer.
A-12. No, they are identical.
A-13. To detect errors in the circuitry.
A-14. A collection of related records.
A-15. Program storage area.
A-16. By the individual programs being used.
A-17. A single binary digit.
A-18. Eight.
A-19. Number of bytes.
A-20. Magnetic cores are strung together on a screen of wire.
A-21. In primary storage.
A-22. The manufacturer.
A-23. Variable-word-length or byte-addressable.
A-24. Fixed-word-length.
A-25. By bits, characters (bytes), fields, records, and files.
7. Quick Reference
DATA is a general term used to describe raw facts like your service number, name, and pay grade.
SOURCE DATA is raw data typically written on some type of paper document.
DATA REPRESENTATION is accomplished by the use of symbols. The symbol itself is not the information,
but merely a representation of it. Symbols convey meaning only when understood. In computers, symbols are
represented by CODES.
COMPUTER CODING SYSTEMS are used to represent numeric, alphabetic, and special characters in
computer storage and on magnetic media.
EXTENDED BINARY CODED DECIMAL INTERCHANGE CODE (EBCDIC) is an 8-bit code used in
computers to represent numbers, letters, and special characters.
AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE (ASCII) is another
8-bit code developed to standardize a binary code to give the computer user the capability of using several
machines to process data regardless of the manufacturer.
A PARITY (CHECK) BIT is used to detect errors in computer circuitry.
MAGNETIC CORE STORAGE is used as primary storage in some computers.
PRIMARY STORAGE CAPACITY AND ADDRESSES are designed and built into the computer by the
manufacturer.
Data in SECONDARY STORAGE like disk or tape is normally organized by bits, characters (bytes), fields,
records, and files.
STORAGE ACCESS METHODS vary with the types of media and devices you are using.
SEQUENTIAL-ACCESS STORAGE is associated with punched cards, paper tape, and magnetic tape.
DIRECT-ACCESS STORAGE is obtained by using magnetic disks and drums.
RANDOM-ACCESS STORAGE refers to magnetic core, semiconductor, thin film, and bubble storage.
A NETWORK is any system composed of one or more computers and terminals; however, most are composed
of multiple terminals and computers.
LOCALAREA NETWORKS (LANs) allow dissimilar machines to exchange information within one
universal system within a building or small geographic area.
WIDE AREA NETWORKS provide for global connections and are sometimes referred to as global networks.
A MODEM converts the digital signal produced by your terminal or the computer to an audio signal suitable
for transmission over a communications line. It also converts the audio signal back to a digital signal before it is
supplied to your terminal or computer.
9. 9 ................ 1001
Equivalent Numbers in Decimal, Binary and Hexadecimal Notation:
Decimal Binary Hexadecimal
0 00000000 00
1 00000001 01
2 00000010 02
3 00000011 03
4 00000100 04
5 00000101 05
6 00000110 06
7 00000111 07
8 00001000 08
9 00001001 09
10 00001010 0A
11 00001011 0B
12 00001100 0C
13 00001101 0D
14 00001110 0E
15 00001111 0F
16 00010000 10
17 00010001 11
31 00011111 1F
32 00100000 20
63 00111111 3F
64 01000000 40
65 01000001 41
127 01111111 7F
128 10000000 80
129 10000001 81
255 11111111 FF
256 0000000100000000 0100
32767 0111111111111111 7FFF
32768 1000000000000000 8000
65535 1111111111111111 FFFF
ASCII Character Set
High Order Bits
Low Order 0000 0001 0010 0011 0100 0101 0110 0111
Bits 0 1 2 3 4 5 6 7
0000 0 NUL DLE Space 0 @ P ` p
0001 1 SOH DC1 ! 1 A Q a q
0010 2 STX DC2 “ 2 B R b r
0011 3 ETX DC3 # 3 C S c s
0100 4 EOT DC4 $ 4 D T d t
0101 5 ENQ NAK % 5 E U e u
0110 6 ACK SYN & 6 F V f v
0111 7 BEL ETB ‘ 7 G W g w
1000 8 BS CAN ( 8 H X h x
1001 9 HT EM ) 9 I Y i y
1010 A LF SUB * : J Z j z
1011 B VT ESC + ; K [ k {
10. 1100 C FF FS , < L l |
1101 D CR GS - = M ] m }
1110 E SO RS . > N ^ n ~
1111 F SI US / ? O _ o DEL
SHORT ANSWERS QUESTIONS
Convert the following binary numbers to base 10:
111 4 + 2 + 1 = 7
1111 8 + 4+2+1 = 15
1100110 64 + 32 + 4 + 2 = 102
11101 ((1 x 24
) + (1 x 23
) + (1 x 22
) + (0 x 21
) + (1 x 20
))10 =29
101.012 1 x 22
+ 0 x 21
+ 1 x 20
+ 0 x 2-1
+ 1 x 2-2
= 4 + 1 + 1/4 = 5.25
Convert the following base 10 numbers into binary numbers:
2110
21/2 10 1
10/2 5 0
5/2 2 1
2/2 1 0
½ 0 1
Decimal Number: 2110 = Binary Number: 101012
2910
29/2 14 1
14/2 7 0
7/2 3 1
3/2 1 1
1/2 0 1
Decimal Number: 2910 =111012
Convert the following hexadecimal to base 10:
A2DE
= ((A) * 163
) + (2 * 162
) + ((D) * 161
) + ((E) * 160
)
= (10 * 163
) + (2 * 162
) + (13 * 161
) + (14 * 160
)
= (10 * 4096) + (2 * 256) + (13 * 16) + (14 * 1)
= 40960 + 512 + 208 + 14
= 41694 decimal
56H = (5 x 161
) + (6 x 160
) = (5 x 16) + (6 x 1).
= 80 + 6.
= 8610
1AFH = (1 x 162
)+(A x 161
)+(F x 160
).
= (1 x 256) + (10 x 16) + (15 x 1).
= 256 + 160 + 15.
= 43110
258 = ((2 x 81
) + (5 x 80
))10
(16 + 5)10
2110
Name the person who developed Boolean algebra.
George Boole was developed Boolean algebra.
11. What is the other name of Boolean algebra? In which year was the Boolean algebra developed? Other
name of Boolean algebra is ‘Switching Algebra’. Boolean algebra was developed in 1854.
What is the binary decision? What do you mean by a binary valued variable?
The decision which results into either YES (TRUE) or NO (FALSE) is called a Binary Decision.
Variables which can store truth values TRUE or FALSE are called logical variables or binary valued variables.
What is a truth table and it significance?
Truth Table is a table which represents all the possible values of logical variables/statements along with all the
possible results of the given combinations of values. With the help of truth table we can know all the possible
combinations of values and results of logical statements
In the Boolean Algebra, verify using truth table that:
X + XY = X for each X , Y in {0 , 1}.
X Y XY X + XY
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
Both the columns X and X + XY are identical, hence proved.
In the Boolean Algebra, verify using truth table that:
(X + Y)’ = X’Y’ for each X , Y in {0 , 1}.
X Y X+ Y (X + Y)’ X’ Y’ X’Y’
0 0 0 1 1 1 1
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 0
Both the columns (X + Y)’ and X’Y’ are identical, hence proved.
Give truth table for the Boolean Expression (X + Y’)’.
X Y Y’ X + Y’ (X + Y’)’
0 0 1 1 0
0 1 0 0 1
1 0 1 1 0
1 1 0 1 0
Draw the truth table for the following equations : (a) M = N (P + R)
(a)M = N (P + R) (b) M = N + P + NP’
N P R P + R N (P + R)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
12. 1 1 0 1 1
1 1 1 1 1
N P R P’ NP’ N + P + NP’
0 0 0 1 0 0
0 0 1 1 0 0
0 1 0 0 0 1
0 1 1 0 0 1
1 0 0 1 1 1
1 0 1 1 1 1
1 1 0 0 0 1
1 1 1 0 0 1
Using truth table, prove that AB + BC + CA’ = AB + CA’.
A B C A’ AB BC CA’ AB + BC + CA’ AB + CA’
0 0 0 1 0 0 0 0 0
0 0 1 1 0 0 1 1 1
0 1 0 1 0 0 0 0 0
0 1 1 1 0 1 1 1 1
1 0 0 0 0 0 0 0 0
1 0 1 0 0 0 0 0 0
1 1 0 0 1 0 0 1 1
1 1 1 0 1 1 0 1 1
Both the columns AB + BC + CA’ and AB + CA’ are identical, hence proved.
Which of the following Boolean equation is/are incorrect? Write the correct forms of the incorrect ones :
12
(a) A + A’ =1 (b) A + 0 = A (c) A . 1 = A (d) AA’=1 (e) A+ AB = A
(f) A(A+B)’ = A (g) (A+B)’ = A’ + B (h) (AB)’=A’B’ (i) A + 1 =1
(j) A + A =A (k) A + A’B = A +B (l) X +YZ = (X + Y) (X + A)
(a) Correct (b) Correct (c) Correct (d) Incorrect. Correct form is A . A’ = 0
(e) Correct (f) Correct (g) Incorrect. Correct form is (A + B)’ = A’B’
(h) Incorrect. Correct form is (AB), = A’ + B’ (i) Correct (j) Correct
(k) Correct (l) Incorrect. Correct form is X + YZ = (X + Y)(X + Z)
State De Morgan’s theorem.
De Morgan suggested two theorems that form important part of Boolean algebra. They are:
1) The complement of a product is equal to the sum of the complements. (AB)’ = A’ + B’
2) The complement of a sum term is equal to the product of the complements. (A + B)’ = A’B’
13. Reduce A.A’C
A.A’C = 0.c [A.A’ = 1] = 0
Reduce A(A + B)
A(A + B) = AA + AB = A(1 + B) [1 + B = 1] = A.
Reduce A’B’C’ + A’BC’ + A’BC
A’B’C’ + A’BC’ + A’BC
= A’C’(B’ + B) + A’B’C
= A’C’ + A’BC [A + A’ = 1]
= A’(C’ + BC) = A’(C’ + B) [A + A’B = A + B]
Reduce AB + (AC)’ + AB’C(AB + C)
AB + (AC)’ + AB’C(AB + C) = AB + (AC)’ + AAB’BC + AB’CC
= AB + (AC)’ + AB’CC [A.A’ = 0]
= AB + (AC)’ + AB’C [A.A = 1]
= AB + A’ + C’ =AB’C [(AB)’ = A’ + B’]
= A’ + B + C’ + AB’C [A + AB’ = A + B]
= A’ + B’C + B + C’ [A + A’B = A + B]
= A’ + B + C’ + B’C
=A’ + B + C’ + B’
=A’ + C’ + 1
= 1 [A + 1 =1]
Simplify the following expression Y = (A + B)(A + C’ )(B’ + C’ )
Y = (A + B)(A + C’ )(B’ + C’ )
= (AA’ + AC +A’B +BC )(B’ + C’) [A.A’ = 0]
= (AC + A’B + BC)(B’ + C’ )
= AB’C + ACC’ + A’BB’ + A’BC’ + BB’C + BCC’
= AB’C + A’BC’
Simplify the following using De Morgan’s theorem [((AB)’C)’’ D]’
[((AB)’C)’’ D]’ = ((AB)’C)’’ + D’ [(AB)’ = A’ + B’]
= (AB)’ C + D’
= (A’ + B’ )C + D’
Show that (X + Y’ + XY)( X + Y’)(X’Y) = 0
(X + Y’ + XY)( X + Y’)(X’Y) = (X + Y’ + X)(X + Y’ )(X’ + Y) [A + A’B = A + B]
= (X + Y’ )(X + Y’ )(X’Y) [A + A = 1]
= (X + Y’ )(X’Y) [A.A = 1]
= X.X’ + Y’.X’.Y
= 0 [A.A’ = 0]
Prove that ABC + ABC’ + AB’C + A’BC = AB + AC + BC
ABC + ABC’ + AB’C + A’BC
14. =AB(C + C’) + AB’C + A’BC
=AB + AB’C + A’BC
=A(B + B’C) + A’BC
=A(B + C) + A’BC
=AB + AC + A’BC
=B(A + C) + AC
=AB + BC + AC
=AB + AC +BC ...Proved
20).Convert the given expression in canonical SOP form Y = AC + AB + BC
Y = AC + AB + BC
=AC(B + B’ ) + AB(C + C’ ) + (A + A’)BC
=ABC + ABC’ + AB’C + AB’C’ + ABC + ABC’ + ABC
=ABC + ABC’ +AB’C + AB’C’ [A + A =1]
21).Convert the given expression in canonical POS form
Y = ( A + B)(B + C)(A + C)
Y = ( A + B)(B + C)(A + C)
= (A + B + C.C’ )(B + C + A.A’ )(A + B.B’ + C)
= (A + B + C)(A + B + C’ )(A + B +C)(A’ + B +C)(A + B + C)(A + B’ + C) [A + BC
= (A + B)(A + C) Distributive law]
= (A + B + C)(A + B + C’)(A’ + B + C)(A’ + B + C)(A + B’ + C)
Simplify the following expression
y = (A + B) (A = C) (B + C)
= (AA + A C + A B + B C) (B + C)
= (A C + A B + B C) (B + C)
= A B C + A C C + A B B + A B C + B B C + B C C
= A B C = A B C
Convert (4021.2)5to its equivalent decimal.
(4021.2)5= 4 x 53
+ 0 x 52
+ 2 x 51
+ 1 x 50
+ 2 x 5-1
= (511.4)10
Write down the steps in implementing a
Boolean function with levels of NAND Gates?
Simplify the function and express it in sum of products.
Draw a NAND gate for each product term of the expression that has at least two literals.
The inputs to each NAND gate are the literals of the term.
This constitutes a group of first level gates.
Draw a single gate using the AND-invert or the invert-OR graphic symbol in the second level, with inputs
coming from outputs of first level gates.
A term with a single literal requires an inverter in the first level.
However if the single literal is complemented, it can be connected directly to an input of the second level
NAND gate.
15. What is a Logic gate?
Logic gates are the basic elements that make up a digital system. The electronic gate is a circuit that is
able to operate on a number of binary inputs in order to perform a particular logical function.
Write the names of basic logical operators, diagrammatical representation and input-output signals or
gates.
Input-Output signals for gates
61. Write the names of Universal gates and why are they known as universal gates.
1. NAND gate
2. NOR gate
The NAND and NOR gates are known as universal gates, since any logic function can be implemented using
NAND or NOR gates.
28) Give the general procedure for converting a Boolean expression in to multilevel NAND diagram?
Draw the AND-OR diagram of the Boolean expression. Convert all AND gates to NAND gates with AND-
invert graphic symbols. Convert all OR gates to NAND gates with invert-OR graphic symbols. Check all the
bubbles in the same diagram. For every bubble that is not compensated by another circle along the same line,
insert an inverter or complement the input literal.
29) What are combinational circuits?
A combinational circuit consists of logic gates whose outputs at any time are determined from the present
combination of inputs. A combinational circuit performs an operation that can be specified logically by a set of
Boolean functions. It consists of input variables, logic gates, and output variables.
Explain the design procedure for combinational circuits
The problem definition
The determination of number of available input variables & required O/P variables.
Assigning letter symbols to I/O variables
Obtain simplified boolean expression for each O/P.
Obtain the logic diagram.
40) Define binary decoder?
A decoder which has an n- bit binary input code and a one activated output out-of -2n output code is called
binary decoder.
A binary decoder is used when it is necessary to activate exactly one of 2n outputs based on an n-bit input value.
41. Represent binary number 1101 - 1012 and find its decimal equivalent
N = 1 x 2 3
+ 1 x 2 2
+ 0
x 2 1
+ 1 x 2 0
+ 1 x 2 -1
+ 0 x 2 -2
+ 1 x 2 -3
= 13.62510
42. Convert (634)8 to binary
6 3 4
16. 110 011 100
Ans = 110 011 100
43. Convert (9 B 2 - 1A)16 to its decimal equivalent.
N = 9 x 16 2
+ B x 16 1
+ 2 x 16 0
+ 1 x 16 -1
+ A (10) x 16 -2
= 2304 + 176 + 2 + 0.0625 + 0.039
= 2482.1 10
44. What are the different classifications of binary codes?
1. Weighted codes
2. Non - weighted codes
3. Reflective codes
4. Sequential codes
5. Alphanumeric codes
6. Error Detecting and correcting codes
KAENUAUGH MAPS REFERENCE
2- and 3-Variable Karnaugh Maps
A
B 0 1
____________
| | | Each square of the map corresponds to a pair
0 | A=0 | A=1 | of values for A and B as indicated.
| B=0 | B=0 |
|_____|_____|
| | |
1 | A=0 | A=1 |
| B=1 | B=1 |
|_____|_____|
A
B 0 1
_______
| | | A B | F Minterms in adjacent squares can
0 | 0 | 1 | -----+--- be combined since they differ in
|___|___| 0 0 | 0 only one variable.
| | | 0 1 | 0
1 | 0 | 1 | 1 0 | 1 F = AB' + AB = sum m(2,3) = A
|___|___| 1 1 | 1
1 cell covering corresponds to a 2-variable term
2 cell covering corresponds to a 1-variable term
A
BC 0 1
_______
| | | A B C | F
00 | 1 | 1 | -------+---
|___|___| 0 0 0 | 1
| | | 0 0 1 | 0 F = sum m(0,2,4,6) = C'
01 | 0 | 0 | 0 1 0 | 1
|___|___| 0 1 1 | 0
| | | 1 0 0 | 1
11 | 0 | 0 | 1 0 1 | 0
|___|___| 1 1 0 | 1
17. | | | 1 1 1 | 0
10 | 1 | 1 |
|___|___|
1 cell covering corresponds to a 3-variable term
2 cell covering corresponds to a 2-variable term
4 cell covering corresponds to a 1-variable term
4-Variable Karnaugh Maps
AB
CD 00 01 11 10
_______________
| | | | |
00 | 0 | 4 | 12| 8 |
|___|___|___|___|
| | | | |
01 | 1 | 5 | 13| 9 |
|___|___|___|___|
| | | | |
11 | 3 | 7 | 15| 11|
|___|___|___|___|
| | | | |
10 | 2 | 6 | 14| 10|
|___|___|___|___|
1 cell covering corresponds to a 4-variable term
2 cell covering corresponds to a 3-variable term
4 cell covering corresponds to a 2-variable term
8 cell covering corresponds to a 1-variable term
Plot f(a,b,c,d) = ad + c' + abd
AB
CD 00 01 11 10
_______________
| | | | |
00 | 1 | 1 | 1 | 1 |
|___|___|___|___|
| | | | |
01 | 1 | 1 | 1 | 1 |
|___|___|___|___|
| | | | |
11 | 0 | 0 | 1 | 1 |
|___|___|___|___|
| | | | |
10 | 0 | 0 | 0 | 0 |
|___|___|___|___|
AB
CD 00 01 11 10
_______________
| | | | |
00 | 1 | 0 | 0 | 1 |
|___|___|___|___|
| | | | |
01 | 0 | 1 | 1 | 0 |
|___|___|___|___|
| | | | |
18. 11 | 0 | 1 | 1 | 0 |
|___|___|___|___|
| | | | |
10 | 1 | 0 | 0 | 1 |
|___|___|___|___|
Given above map, we see that F = sum m(0,2,5,7,8,10,13,15).
Also, F = B'D' + BD.
AB
CD 00 01 11 10
_______________
| | | | |
00 | X | 0 | 0 | 1 |
|___|___|___|___|
| | | | |
01 | 1 | 1 | 0 | 0 |
|___|___|___|___|
| | | | |
11 | X | 1 | 0 | 0 |
|___|___|___|___|
| | | | |
10 | 0 | 0 | 0 | 1 |
|___|___|___|___|
Given above map, we see that F = sum m(1,5,7,8,10) + sum d(0,3). Also, F = A'D + AB'D'.
Karnaugh maps can be used to find a minimum sum-of-products. Consider f = xy' + wxy +
w'z':
wx
yz 00 01 11 10
_______________
| | | | |
00 | 1 | 1 | 1 | 0 | f' = wx' + w'yz + w'x'z
|___|___|___|___|
| | | | | Minimum product of sums:
01 | 0 | 1 | 1 | 0 | f = (w' + x)(w + y' + z')(w + x + z')
|___|___|___|___|
| | | | | Minimum sum of products:
11 | 0 | 0 | 1 | 0 | f = xy' + wx + w'z'
|___|___|___|_ _|
| | | | |
10 | 1 | 1 | 1 | 0 |
|___|___|___|___|