0% found this document useful (0 votes)
27 views44 pages

3 GOAT Computer Awareness PDF - Number System and Digital Logics

as

Uploaded by

sukutrao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views44 pages

3 GOAT Computer Awareness PDF - Number System and Digital Logics

as

Uploaded by

sukutrao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

.

GOAT Computer Awareness PDF - Number System and Digital Logics

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 1


.

GOAT Computer Awareness PDF - Number System and Digital Logics

NUMBER SYSTEM AND DIGITAL LOGICS

A digital system can understand positional number system only where there are a few symbols called

digits and these symbols represent different values depending on the position they occupy in the
number.

A value of each digit in a number can be determined using

1. The digit
2. The position of the digit in the number

3. The base of the number system (where base is defined as the totalnumber of digits available in

the number system).

DECIMAL NUMBER SYSTEM

The number system that we use in our day-to-day life is decimal number system. It consists of 10 digits

from 0 to 9. These digits can be used to represent any numeric value. It is also known as Base 10

system or positional number system. e.x. 127510.

BINARY NUMBER SYSTEM (base 2)

This system is very efficient for computers, but not for humans. It contains only two unique digits 0’sand
1’s. It is also known as Base 2 system. A string, which has any combination of these two digits (0 and 1

are called a bit) is called binary number. The computer always calculates input in binary form. e.x.

101112

Example

Binary Number: 101012


Calculating Decimal Equivalent:

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 2


.

GOAT Computer Awareness PDF - Number System and Digital Logics

STEP BINARY DECIMAL NUMBER


NUMBER

Step 1 101112 ((1 x 24) + (0 x 23) + (1 x


22) + (1 x 21) +

(1 x 20))10

Step 2 101112 (16 + 0 + 4 + 1 + 1)10

Step 3 101112 2210

OCTAL NUMBER SYSTEM

● Uses eight digits, 0,1,2,3,4,5,6,7.


● Also called base 8 number system

● Each position in an octal number represents a 0 power of the base (8). Example: 8 0

Example

Octal Number: 125708

STEP BINARY DECIMAL NUMBER


NUMBER

Step 1 125718 ((1 x 84) + (2 x 83) + (5 x

82) + (7 x 81) + (1

x 80))10

Step 2 125718 (4096 + 1024 + 320 + 56 +

1)10

Step 3 125718 549710

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 3


.

GOAT Computer Awareness PDF - Number System and Digital Logics

HEXADECIMAL NUMBER SYSTEM(base 16)

● 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.
● Each position in a hexadecimal number represents a 0 power of the base (16). Example 16 0.
● Last position in a hexadecimal number represents an x power of the base

Example:
Hexadecimal Number: 19FDE16

STEP HEXADECIMAL DECIMAL NUMBER

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 x161) +


(14 x 160))10

Step 3 19FDE16 (65536+ 36864 + 3840 +

208 + 14)10

Step 4 19FDE16 10646210

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 4


.

GOAT Computer Awareness PDF - Number System and Digital Logics

NUMBER SYSTEM CONVERSION

There are many methods or techniques which can be used to convert numbers from one base to
another.

● Decimal to Other Base System


● Other Base System to Decimal
● Other Base System to Non-Decimal

DECIMAL TO OTHER BASE SYSTEM

Steps
● Step 1 - Divide the decimal number to be converted by the value of the desired 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.

● Step 4 - Record the remainder from Step 3 as the next digit (to the left)
of the new base number.

Until the quotient becomes zero, Step 3 and Step 4 must be repeated.

The last remainder thus obtained will be the Most Significant Digit (MSD) of the new base number.
Example:

Decimal Number: 3110

Step Operation Result Remainder

1 31 / 2 15 1

2 15 / 2 7 1

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 5


.

GOAT Computer Awareness PDF - Number System and Digital Logics

3 7/2 3 1

4 3/2 1 1

5 1/2 0 1

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: 3110 = Binary Number: 111112.

OTHER BASE SYSTEM TO DECIMAL SYSTEM

Steps
● Determine the positional value of each digit.
● Multiply the obtained column values (in Step 1) by the digits in the corresponding columns.

● Sum the products calculated in Step 2. The total is the equivalent value in decimal.

Example
Binary Number: 111012

STEP BINARY DECIMAL NUMBER


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

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 6


.

GOAT Computer Awareness PDF - Number System and Digital Logics

OTHER BASE SYSTEM TO NON-DECIMAL SYSTEM

Steps
● Convert the original number to a decimal number (base 10).

STEP OCTAL NUMBER DECIMAL NUMBER

1 258 ((2 x 81) + (5 x 80))10

2 258 (16 + 5 )10

3 258 2110

● Convert the decimal number so obtained to the new base number

Step Operation Result Remainder

1 21 / 2 10 1

2 10 / 2 5 0

3 5/2 2 1

4 2/2 1 0

5 1/2 0 1

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 7


.

GOAT Computer Awareness PDF - Number System and Digital Logics

BINARY TO OCTAL

Steps
● Divide the binary digits into groups of three (starting from the right).

● Convert each group of three binary digits to one octal digit.


Example
Binary Number: 101012

Octal Equivalent

Binary Number: 101012

STEP BINARY OCTAL NUMBER


NUMBER

Step 1 101012 010 101

Step 2 101012 28 58

Step 3 101012 258

OCTAL TO BINARY

Steps

● Convert each octal digit to a 3 digit binary number (the octal digits may be treated as decimal for
this conversion).

● Combine all the resulting binary groups (of 3 digits each) into a single binary number.

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 8


.

GOAT Computer Awareness PDF - Number System and Digital Logics

STEP OCTAL NUMBER BINARY NUMBER

Step 1 258 210 510

Step 2 258 0102 1012

Step 3 258 0101012

BINARY TO HEXADECIMAL

Steps

● Divide the binary digits into groups of four (starting from the right).
● Convert each group of four binary digits to one hexadecimal symbol.

Example
Binary Number: 101012

STEP BINARY DECIMAL NUMBER

NUMBER

Step 1 101012 0001 0101

Step 2 101012 110 510

Step 3 101012 1516

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 9


.

GOAT Computer Awareness PDF - Number System and Digital Logics

HEXADECIMAL TO BINARY

Steps:
● Convert each hexadecimal digit to a 4 digit binary number (the hexadecimal digits may be treated

as decimal for this conversion).


● Combine all the resulting binary groups (of 4 digits each) into a single binary number.

Example
Hexadecimal Number: 1516

STEP HEXADECIMAL NUMBER DECIMAL NUMBER

Step 1 1516 110 510

Step 2 1516 00012 01012

Step 3 1516 000101012

BINARY CODES

In digital, when numbers, letters or words are represented by a specific group of symbols, it is said that
the number, letter or word is being encoded. These groups of symbols, numbers and letters are then
said to be called code. The digital data is represented, stored and transmitted as group of binary bits.

This group is also called binary code.

ADVANTAGES

♦ Binary codes are suitable for computer applications.

♦ Binary codes are suitable for digital communications.

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 10


.

GOAT Computer Awareness PDF - Number System and Digital Logics

♦ Since only 0 & 1 are being used, implementation becomes easy.

CLASSIFICATION OF BINARY CODES

1. Weighted Codes: - Weighted binary codes are those binary codes which obey the positional
weight principle. Each position of the number represents a specific weight. Several systems of the

codes are used to express the decimal digits 0 through 9. In these codes each decimal digit is
represented by a group of four bits.

2.
For example the decimal number 24 is taken. The MSB and the LSB both are represented in
binary form. Hence, 0010 comes from the MSB bit

3. Excess-3 code: - The Excess-3 code is also called XS-3 code. It is a non-weighted code used to
express decimal numbers. The Excess-3 code words are derived from the 8421 BCD code words
adding (0011)2 or (3)10 to each code word in 8421. The excess-3 codes are obtained as follows:

DECIMAL BCD EXCESS 3

8 4 2 1 BCD + 0011

0 0 0 0 0 0 0 1 1

1 0 0 0 1 0 1 0 0

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 11


.

GOAT Computer Awareness PDF - Number System and Digital Logics

2 0 0 1 0 0 1 0 1

3 0 0 1 1 0 1 1 0

4 0 1 0 0 0 1 1 1

5 0 1 0 1 1 0 0 0

6 0 1 1 0 1 0 0 1

7 0 1 1 1 1 0 1 0

8 1 0 0 0 1 0 1 1

9 1 0 0 1 1 1 0 0

4. Gray Code: - They are non-weighted codes but not arithmetic code. That means there are no

specific weights assigned to the bit position. It has a very special feature that only one bit will
change each time the decimal number is incremented. As only one bit changes at a time, the gray
code is called a unit distance code. The gray code is a cyclic code which cannot be used for

arithmetic operation.

DECIMAL BCD GRAY

8 4 2 1

0 0 0 0 0 0 0 0 0

1 0 0 0 1 0 0 0 1

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 12


.

GOAT Computer Awareness PDF - Number System and Digital Logics

2 0 0 1 0 0 0 1 1

3 0 0 1 1 0 0 1 0

4 0 1 0 0 0 1 1 0

5 0 1 0 1 0 1 1 1

6 0 1 1 0 0 1 0 1

7 0 1 1 1 0 1 0 0

8 1 0 0 0 1 1 0 0

9 1 0 0 1 1 1 0 1

5. Binary Coded Decimal (BCD) code: - In this code each decimal digit is represented by a 4-bit

binary number. BCD is a way to express each of the decimal digits with a binary code. In the

BCD, with four bits we can represent sixteen numbers (0000 to 1111). But in BCD code only the
first ten of these are used (0000 to 1001). The remaining six code combinations i.e. 1010 to 1111
are invalid in BCD.

0 1 2 3 4 5 6 7 8 9

0000 0001 0010 0011 0100 0101 0110 0111 1000 1001

The first row denotes the DECIMAL NUMBER and the second one the BINARY NUMBER.
6. Alphanumeric codes : - A binary digit or bit can represent only two symbols as it has only two
states '0' or '1'. The alphanumeric codes are the codes that represent numbers and alphabetic

characters. Mostly such codes also represent other characters such as symbols and various
instructions necessary for conveying information. An alphanumeric code should at least represent
10 digits and 26 letters of alphabet i.e. total 36 items.
Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 13


.

GOAT Computer Awareness PDF - Number System and Digital Logics

The following alphanumeric codes are commonly used: -

♦ ASCII : - American Standard Code for Information Interchange is a 7-bit code


♦ EBDIC: - Extended Binary Coded Decimal Interchange Code s an 8-bit code
♦ Baudot Code: - It is binary code which uses crosses and dots.

ERROR DETECTION AND CORRECTION

Error detection and correction code plays an important role in the transmission of data from one source
to another. The noise also gets added into the data when it transmits from one system to another, which
causes errors in the received binary data at other systems. The bits of the data may change (either 0 to

1 or 1 to 0) during transmission.
Error in communication represents the fact that the input does not match with the output. In short, if you
are sending 0110, the output received at the receiver’s end is 1100.

Error-Detecting Codes
When a message gets transmitted, it may get corrupted due to interference of noise. To avoid this, we

use error-detecting codes which are additional data added to a given digital message to help us detect if

an error occurred during transmission of the message. One technique of error-detection is Parity Check.

Error-Correcting Codes
Error-correcting codes also deploy the same strategy as error-detecting codes but additionally, such

codes also detect the exact position of the faulty bit.

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 14


.

GOAT Computer Awareness PDF - Number System and Digital Logics

Parity Checking of Error Detection

The MSB of an 8-bits word is used as the parity bit and the remaining 7 bits are used as data or
message bits. The parity of 8-bits transmitted word can be either even parity or odd parity.

Even parity: - Even parity means the number of 1's in the given word including the parity bit should be

even (2, 4, 6,....).

Odd parity: - Odd parity means the number of 1's in the given word including the parity bit should be odd
(1, 3, 5,....).

BINARY ARITHMETIC

Binary Addition

A+B SUM CARRY

0 0 0 0

0 1 1 0

1 0 1 0

1 1 0 1

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 15


.

GOAT Computer Awareness PDF - Number System and Digital Logics

The binary addition operation works similarly to the base 10 decimal system, except that it is a base 2

system. The binary system consists of only two digits, 1 and 0. Most of the functionalities of the
computer system use the binary number system. The binary code uses the digits 1’s and 0’s to make
certain processes turn off or on. The process of the addition operation is very familiar to the decimal

system by adjusting to the base 2.

How to Do Binary Addition?

Now, let us understand this with an example of the binary addition; 101 + 101

♦ First consider the 1’s column, and add the one’s column,( 1+1 ) and it gives the result 10 as per

the condition of binary addition.

♦ Now, leave the 0 in the one’s column and carry the value 1 to the 10’s column.

♦ Now add 10’s place, 1+ (0 + 0) = 1. So, nothing carries to the 100’s place and leave the value 1 in

the 10’s place.

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 16


.

GOAT Computer Awareness PDF - Number System and Digital Logics

♦ Now add the 100’s place (1 + 1) = 10. Leave the value 0 in the 100’s place and carries 1 to the

1000’s place.

So, the resultant of the addition operation is 1010.

When you cross-check the binary value with the decimal value, the resultant value should be the same.
The binary value 101 is equal to the decimal value 5. So, 5 + 5 = 10

The decimal number 10 is equal to the binary number 1010.

Binary Subtraction

Subtraction of binary numbers is an arithmetic operation similar to the subtraction of decimal numbers or
base 10 numbers. For example, 1 + 1 + 1 = 3 in base 10 and 1 + 1 + 1 = 11 in the binary number

system. When you add and subtract binary numbers, you will need to be careful when borrowing as
these will take place more often.

A–B DIFFERENCE BORROW

0 0 0 0

1 0 1 0

1 1 0 0

0 1 0 1

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 17


.

GOAT Computer Awareness PDF - Number System and Digital Logics

How to do Binary Subtraction?


Example:- (110101)2 – (100101)2

(1 1 0 1 0 1)2 = 5310

(1 0 0 1 0 1)2 = 3710 – SUBTRAHEND

Now, taking the 1’s complement of the subtrahend and add with minuend.

Therefore, the solution is 010000

(010000)2 = 1610

BOOLEAN ALGEBRA

The logical symbol 0 and 1 are used for representing the digital input or output. The symbols "1" and "0"
can also be used for a permanently open and closed digital circuit. The digital circuit can be made up of
Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 18


.

GOAT Computer Awareness PDF - Number System and Digital Logics

several logic gates. To perform the logical operation with minimum logic gates, a set of rules were

invented, known as the Laws of Boolean Algebra. These rules are used to reduce the number of logic
gates for performing logic operations.

Rules in Boolean Algebra

● Variables used can have only two values. 1 for HIGH and 0 for LOW.

● Complement of a variable is represented by an overbar (-). Thus, the complement of variable B is


represented as B . Thus if B = 0 then B = 1 and B = 1 then B= 0.
● ORing of the variables is represented by a plus (+) sign between them. For example ORing of A,

B, C is represented as A + B + C.
● Logical ANDing of the two or more variable is represented by writing a dot between them such as
A.B.C. Sometime the dot may be omitted like ABC.

Boolean Laws

1. Commutative Law: - Commutative law states that changing the sequence of the variables does
not have any effect on the output of a logic circuit.

A+B = B+A
Commutative law of addition

A.B = B.A
Commutative law of multiplication

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 19


.

GOAT Computer Awareness PDF - Number System and Digital Logics

2. Associative Law: - This law states that the order in which the logic operations are performed is

irrelevant as their effect is the same.


A + (B + C) = (A + B) + C
A.(BC) = (AB).C
Associative law of addition
Associative law of multiplication

A. (B+C) = A.B + A.C


3. Distributive Law : - Distributive law states

4. AND Law: - These laws use the AND operation.

1. A.0 = 0 3. A. A= A

2. A.1 = 1 4. A. A = 0

5. OR law: - These laws use the OR operations

1. A+0 = A 3. A+A= A

2. A+1 = 1 4. A.A = 1

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 20


.

GOAT Computer Awareness PDF - Number System and Digital Logics

6. INVERSION Law: - This law uses the NOT operation. The inversion law states that double

inversion of variable results in the original variable itself.

A=A

LOGIC GATES

A logic gate is a virtual or physical device that performs a Boolean function. These are used to make
logic circuits. Logic gates are the main components of any digital system. This electrical circuit can have

only one output and 1 or more inputs. The relation between the input and the output is governed by
specific logic. AND, OR, NOT gate, etc are the examples of logic gates.

Types of Logic Gates

● AND Gate (Product): - A logic gate with two or more inputs and a single output is known as an
AND gate. The logic multiplication rules are used to operate an AND gate. An AND gate can have
any number of inputs, although the most common are two and three-input AND gates. If any of

the inputs are low (0), the output is also low in this gate. When all of the inputs are high (1), the
output will be high as well.

Truth table:

For AND gate, the output “out” is true if and only if both the inputs A and B are true. So the truth
table of AND gate is as follows:

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 21


.

GOAT Computer Awareness PDF - Number System and Digital Logics

A B OUT= A. B

T T T

T F F

F T F

F F F

● OR Gate (Sum): - A logic gate that performs a logical OR operation is known as an OR gate. If

one or both of the gate’s inputs are high, the logical OR operation produces a high output (1). (1).
If neither of the inputs is high, the result is a low output (0). In the same way that an AND gate
can have an unlimited number of input probes, an OR gate can only have one output probe. A

logical OR gate finds the maximum between two binary digits.

Truth table:

A B OUT= A + B

T T T

T F T

F T T

F F F

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 22


.

GOAT Computer Awareness PDF - Number System and Digital Logics

● NOT Gate (Complement): Inverting NOT gates are those devices that take only one input with an

output level that is ordinarily at logic level 1 and goes low to a logic level 0 when their single input
is at logic level 1, or in other words, they invert their input signal. A NOT gate’s output only returns
high, when its input is at logic level 0. The output P (compliment value of P) of a single input NOT

gate is only true when the input P is false or we can say, Not true. It is also called inverse gate as
it results the negation of the input Boolean Expression.

P NOT P

Truth table: - For the NOT gate, the output X is true if and only if input P is false. So the truth

table of NOT gate is as follows:

P P

T F

F T

● NAND Gate: - A logic gate known as a NAND gate provides a low output (0) only if all of its inputs

are true, and high output (1) otherwise. As a result, the NAND gate is the inverse of an AND gate,
and its circuit is created by joining AND gate and NOT gate. NAND means ‘Not of AND’ Gate and

it results in false only when both the inputs P and Q are true. AND gates (together with NOR
gates) are known as universal gates because they are a form of logic gate that can implement
any Boolean function without the usage of any other gate type.

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 23


.

GOAT Computer Awareness PDF - Number System and Digital Logics

Truth table:

For the NAND gate, the output X is false if and only if both the inputs (i.e., P and Q) are true. So

the truth table of the NAND gate is as follows:

A B OUT= (A.B)

T T F

T F T

F T T

F F T

● NOR Gate: A logic gate known as a NOR gate provides a high output (1) only if all of its inputs

are false and low output (0) otherwise. As a result, the NOR gate is the inverse of an OR gate,
and its circuit is created by joining OR gate and NOT gate. NOR means ‘Not of OR’ Gate & it

results in true only when both the inputs A and B are false.

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 24


.

GOAT Computer Awareness PDF - Number System and Digital Logics

A B Q= (A+ B)

T T F

T F F

F T F

F F T

● XOR Gate: - An XOR gate (also known as an Exclusive OR gate) is a digital logic gate that
conducts exclusive disjunction and has two or more inputs and one output. Only one of an XOR
gate’s inputs must be true for the output to be true. The output of an XOR gate is false if both of

its inputs are false or true if both of its inputs are true. XOR means ‘Exclusive OR’ Gate & it
results in true only when either of the 2 inputs P & Q is true, i.e., either A is true or B is true but

not both.

A B out= A ⊕ B

T T F

T F T

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 25


.

GOAT Computer Awareness PDF - Number System and Digital Logics

F T T

F F F

● XNOR Gate: - XNOR means ‘Exclusive NOR’ Gate and it result is true only when both of its

inputs A and B are either true or false.

A B out= A B

T T T

T F F

F T F

F F T

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 26


.

GOAT Computer Awareness PDF - Number System and Digital Logics

DE MORGAN’S LAWS

De Morgan’s Law states that:

Statement 1: The Complement of the product (AND) of two Boolean variables (or expressions) is equal
to the sum (OR) of the complement of each Boolean variable (or expression)

Proof: (P.Q) = (P) + (Q)

Statement: (P.Q) = (P) + (Q)

P Q

P Q P.Q P + Q

T T F F F F

T F F T T T

F T T F T T

F F T T T T

Statement 2: The Complement of sum (OR) of two Boolean variables (or expressions) is equal to the
product (AND) of the complement of each Boolean variable (or expression).

(P + Q) = (P).(Q)

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 27


.

GOAT Computer Awareness PDF - Number System and Digital Logics

Proof :

Statement: (P+Q) = (P). (Q)

P Q

P Q P+ Q (P) . (Q)

T T F F F F

T F F T F F

F T T F F F

F F T T T T

COMBINATIONAL CIRCUITS

Digital logic circuits can be classified into “combinational” and “sequential”. A combinational logic circuit
is one whose output solely depends on its current inputs. Sequential circuits, on the other hand, are built

using combinational circuits and memory elements called “flip-flops”.

Some of the characteristics of combinational circuits are following


● The output of a combinational circuit at all and any instant of time depends only on the levels

present at the input.


● The combinational circuits do not use any memory. The previous state of input does not have any
effect on the present state of the circuit.

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 28


.

GOAT Computer Awareness PDF - Number System and Digital Logics

n input m output
variables variables

The 'n' input variable comes from the external source while the 'm' output variable goes to the external
destination. In many applications, the source or destinations are storage registers.

Half Adder

The half adder adds two binary digits and produces two outputs as sum and The half adder circuit is

designed to add two single bit binary number A and B. It is the basic building block for addition of two

single bit numbers. This circuit has two outputs carry and sum.

HALF
ADDER

INPUTS OUTPUTS

A B SUM CARRY

0 0 0 0

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 29


.

GOAT Computer Awareness PDF - Number System and Digital Logics

0 1 1 0

1 0 1 0

1 1 0 1

Full Adder

The difference between a half-adder and a full-adder is that the full-adder has three inputs and two
outputs, whereas a half adder has only two inputs and two outputs.

FULL
ADDER

INPUTS OUTPUTS

A B Cin SUM Co

0 0 0 0 0

0 0 1 1 0

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 30


.

GOAT Computer Awareness PDF - Number System and Digital Logics

0 1 0 1 0

0 1 1 0 1

1 0 0 1 0

1 0 1 0 1

1 1 0 0 1

1 1 1 1 1

Half Subtractors

A half subtractor is a multiple output combinational logic network that does the subtraction of two bits of

binary data. It has input variables and two output variables. Two inputs are corresponding to two input
bits and two output variables correspond to the difference bit and borrow bit.

INPUTS OUTPUTS

A B (A- BORROW

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 31


.

GOAT Computer Awareness PDF - Number System and Digital Logics

B)DIFFERENCE

0 0 0 0

0 1 1 1

1 0 1 0

1 1 0 0

Full Subtractors

The disadvantage of a half subtractor is overcome by a full subtractor. The full subtractor is a

combinational circuit with three inputs A,B,C and two outputs D and C'. A is the 'minuend', B is
'subtrahend', C is the 'borrow' produced by the previous stage, D is the difference output and C' is the
borrow output.

INPUTS OUTPUTS

A B Bin (A-B-Bin)
DIFFERENCE (D)
C= Bout

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 32


.

GOAT Computer Awareness PDF - Number System and Digital Logics

0 0 0 0 0

0 0 1 1 0

0 1 0 1 0

0 1 1 0 1

1 0 0 1 0

1 0 1 0 1

1 1 0 0 1

1 1 1 1 1

Encoders

An encoder is a logic circuit that converts digits to a binary coded format. This process is known as
encoding. An encoder has n inputs and m outputs. It has a maximum of 2 n input lines and 'n' output

lines.
Block Diagram

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 33


.

GOAT Computer Awareness PDF - Number System and Digital Logics

Decoders

A decoder is a circuit which has n inputs and 2n outputs, and outputs 1 on the wire corresponding to the
binary number represented by the inputs.

Block Diagram

Multiplexers

Multiplexing is the property of combining one or more signals and transmitting on a single channel. This
is achieved by the device multiplexer. A multiplexer is the most frequently used combinational circuit and

an important building block in many digital systems. A multiplexer is a device which allows one of a
number of inputs to be routed to a single output.

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 34


.

GOAT Computer Awareness PDF - Number System and Digital Logics

De-multiplexer
A De-multiplexer is a combinational circuit that has only 1 input line and 2 n output lines and n control

signals. The information is received from the single input lines and directed to the output line.

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 35


.

GOAT Computer Awareness PDF - Number System and Digital Logics

SEQUENTIAL CIRCUITS

The combinational circuit does not use any memory. Hence the previous state of input does not have
any effect on the present state of the circuit. But a sequential circuit has memory so output can vary

based on input. This type of circuit uses previous input, output, clock and a memory element.

Inputs Outputs
COMBINATIONAL

CIRCUITS

MEMORY

ELEMENTS

Flip Flop
Flip flop is a sequential circuit which generally samples its inputs and changes its outputs only at

particular instants of time and not continuously. Flip flop is said to be edge sensitive or edge triggered
rather than being level triggered like latches.

S-R Flip Flop


It is basically an S-R latch using NAND gates with an additional enable input. It is also called as level

triggered SR-FF. For this, circuit in output will take place if and only if the enable input (E) is made

active. In short this circuit will operate as an S-R latch if E = 1 but there is no change in the output if E =
0.

Block Diagram

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 36


.

GOAT Computer Awareness PDF - Number System and Digital Logics

Circuit Diagram

What is a race condition?

When the S and R input of an S-R flip-flop is at logical 1, then the output becomes unstable and it is

known as race condition. When the S and R inputs of an SR flip-flop is at logical 1 and then the input is

changed to any other condition, then the output becomes unpredictable and this is called the race

condition.

Master Slave JK Flip Flop

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 37


.

GOAT Computer Awareness PDF - Number System and Digital Logics

Master slave JK FF is a cascade of two S-R flip flops with feedback from the output of second to input of

first. Master is a positive level triggered. But due to the presence of the inverter in the clock line, the
slave will respond to the negative level. Hence when the clock = 1 (positive level) the master is active
and the slave is inactive. Whereas when clock = 0 (low level) the slave is active and master is inactive.

Circuit Diagram

D Flip Flop

Delay Flip Flop or D Flip Flop is the simple gated S-R latch with a NAND inverter connected between S
and R inputs. It has only one input. The input data is appearing at the output after some time. Due to this
data delay between i/p and o/p, it is called delay flip flop. S and R will be the complements of each other

due to the NAND inverter. Hence S = R = 0 or S = R = 1, these input conditions will never appear. This

problem is avoided by SR = 00 and SR = 1 conditions.

Block Diagram

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 38


.

GOAT Computer Awareness PDF - Number System and Digital Logics

Circuit Diagram

Toggle Flip Flop / T Flip Flop

Toggle flip flop is basically a JK flip flop with J and K terminals permanently connected together. It has
only input denoted by T as shown in the Symbol Diagram. The symbol for positive edge triggered T flip
flop is shown in the Block Diagram.

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 39


.

GOAT Computer Awareness PDF - Number System and Digital Logics

Block Diagram

REGISTERS

A Register is a collection of flip flops. A flip flop is used to store single bit digital data. For storing a large

number of bits, the storage capacity is increased by grouping more than one flip flops. If we want to
store an n-bit word, we have to use an n-bit register containing n number of flip flops.

Types of Registers

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 40


.

GOAT Computer Awareness PDF - Number System and Digital Logics

1. Accumulator Register: - The CPU mostly uses an accumulator register. The accumulator register

is used to store the system result. All the results will be stored in the accumulator register when
the CPU produces some results after processing.
2. Program Counter: - The program counter is also called an instruction address register or

instruction pointer. In simple words, the program counter contains the memory address of the
location of the next instruction.
3. Memory Address Register: - The Memory Address Register is a special type of register that

contains the memory address of the data and instruction.


4. Memory Data Register: - Memory Data Register is a part of the computer's control unit. It contains
the data that we want to store in the computer storage or the data fetched from the computer

storage.
5. Index Register: - In CPU, the index register is a processor register used to modify the operand
address during the running program.

6. Memory Buffer Register: - Memory Buffer Register is mostly called MBR. The MBR contains the

Metadata of the data and instructions written in or read from memory.

7. Data Register: - The data register is used to temporarily store the data. This data transmits to or
from a peripheral device.

UNDERSTANDING THE CONCEPTS OF MINTERM AND MAXTERM

A Boolean function can be expressed in two ways;


● Minterm canonical form
● Maxterm canonical form

What is a literal in Boolean function?

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 41


.

GOAT Computer Awareness PDF - Number System and Digital Logics

A Literal signifies the Boolean variables including their complements. Such as, if A is a boolean variable,

A’ is the complement. Here A’ or A or even ~A signifies a compliment of variable A.

1. MINTERM

The product of all literals, either with complement or without complement, is known as minterm.

Example
The minterm for the Boolean variables A and B is:
A.B

A.B’
A’.B

Minterm from values

Using variable values, we can write the minterms as:

● If the variable value is 1, we will take the variable without its complement.
● If the variable value is 0, take its complement.

Example
Let's assume that we have three Boolean variables A, B, and C having values.
1,0 and 0 respectively i.e. A=1, B-0 and C=0.

Now, we will take the complement of the variables B and C because these values are 0 and will take A
without complement. So, Minterm=A.B'C'

Let's take another example in which we have two variables B and C having the value.

In order to cement this concept let us take another example

Let two variables, A=0 and C=1

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 42


.

GOAT Computer Awareness PDF - Number System and Digital Logics

Therefore, Minterm = A’C

Minterm = AB'C'

● First, we will write the minterm:


Minterm = AB'C'

● Now, we will write 0 in place of complement variables B' and C'.


Minterm = A00
● We will write 1 in place of non-complement variable A.

Minterm = 100
● The binary number of the minterm AB'C' is 100. The decimal point number of (100)2 is 4. So, the
shorthand notation of AB'C' is

● Minterm = m4

2. MAXTERM: - The sum of all literals, either with complement or without complement, is known as

maxterm.

● If the variable value is 1, then we will take the variable without a complement.

● If the variable value is 0, take the complement of the variable.

Example

Let's assume that we have three Boolean variables A, B., and C having values

A=1, B=0, C=0

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 43


.

GOAT Computer Awareness PDF - Number System and Digital Logics

We will take the complement of the variables B and C because these values are 0 and will take A
without complement. So, the maxterm will be: A+B'+C'

If Maxterm = A+B'

● First, we write the Maxterm = A+B'


● Now, we will write 0 in place of complement variable B'.
● We will write 1 in place of non-complement variable A.

● The binary number of the maxterm A+B' is 10. The decimal point number of (10)2 is 2. So, the
shorthand notation of A+B' is
● Maxterm = M2

Click Here for GOAT (The Complete Mentorship Program for Bank Exams)

In case of any queries contact us via this email: [email protected] 44

You might also like