QUAN-Digital BSCIT Descriptive
QUAN-Digital BSCIT Descriptive
QUAN-Digital BSCIT Descriptive
--------------------------------------
Long Answer Questions
--------------------------------------
NUMBER SYSTEM
Q. If x = 1101.110 and y = 1001.101 (both in binary), find x + y and x - y (by 2’s complement method).
Ans:
x = 1101.110
y = 1001.101
(x + y) =
1101.110 (13.75)
1001.101 (9.625)
10111.011 (23.375)
1101.110 (13.75)
(9.625)
01001.101 10110.010
1’s complement
2’s complement
include sign
10110 010
+1 +1
10111 011
10111 011
So,
01101 0.110
+10111 +0.011
100100 1.001
discard discard
Answer = (100.001) 2
(4.125)
OR (0100.001) 2
C F 8 . 7
12 15 8 . 7
(110011111000.111)2
1
Digital Electronics : Notes By Debanjan Patra
Answer = (110011111000.111) 2
HEX to OCTAL
(CF8.7)16 ( ? )8
C F 8 . 7
12 15 8 . 7
(110011111000.111)2
6 3 7 0 . 7
Answer = (6370.7)8
HEX to DECIMAL
(CF8.7)16 ( ? )10
C F 8 . 7
12 15 8 . 7
= 12 x 256 + 15 x 16 + 8 + 7/16
= 3320.4375
Answer = (3320.4375)10
2
Digital Electronics : Notes By Debanjan Patra
Answer = (010101)2
OR (00001 0101)BCD
sign bit
and (A – B) :
1001
01100 10011
1’s comp.
include sign 2’s comp.
10011
+ 1
10100
1001 01001
+10100
11101
Again 1’s comp. (As here minuend is greater)
This is sign
00010
This will be + 1 (For 2’s comp.)
here 00011
+1 0 0 1 1
sign bit
Answer = (1 0011) 2
AB
C 00 01 11 10
000 010 110 100
0 0 1 2 1 6 1 4 1
_
AB
_ _
3
Digital Electronics : Notes By Debanjan Patra
y = (AB + C) (Answer)
_
(b) F = xy + yz + xz
_ _ _ _ _
= xy(z + z ) + yz(x + x) + xz(y + y) [As (A + A) = 01
_ _ _ _
= xyz + xyz + xyz + xyz + xyz + xyz
_ _ _
= xyz + xyz + xyz + xyz [Since, (A + A) = A]
xy __ _ _
Z xy xy xy xy
_ ___ _ _ _ __
Z xyz xyz xyz xyz
1 xy
__ _ _
Z xyz xyz xyz xyz
1 1 1
yz xz
Q. Simplify the following expression and then express in (a) S-O-P and (b) P-O-S:
x'z' + y'z' + yz' + xy
Ans: y = x'z' + y'z' + yz' + xy
= x'z'(y + y') + y'z' (x + x') + yz'(x + x') + xy(z + z')
= x'yz' + x'y'z' + xy'z' + x'y'z' + xyz' + x'yz' + xyz + xyz'
= (x'y'z' + x'yz' + xy'z' + xyz' + xyz)
Z ___ _ _ _ __
xyz xyz xyz xyz Z
1 1 1 1
Z __ _ _
xyz xyz xyz xyz
1
xy
_
y = ( xy + z ). This is the simplified form. (Answer)
4
Digital Electronics : Notes By Debanjan Patra
xy __ _ _
Z xy xy xy xy
___ _ _ _ __ _
Z xyz xyz xyz xyz
1 1 1 1
Z __ _ _
xyz xyz xyz xyz
Z 0 0 1 0
_ _
(x+Z) (y+Z)
_ _
The SOP form is y = ( x + Z )( y + Z ) (Answer)
A _
A A
B
_ __ _
B AB AB
1
B _
AB AB
1
y = A + AB
_ _
= A(B + B) + AB [since, B + B = 1]
_
= AB + AB
y=A
5
Digital Electronics : Notes By Debanjan Patra
__ __
y = ( AC + AD + BC ) (Answer)
Q. For function F (A, B, C, D) = Σ (0,1,7,8,9,14,15), find the expression for F in POS form.
Ans: F (A, B, C, D) = Σm (0,1,7,8,9,14,15)
__
y = ( BC + BCD + ABC )
6
Digital Electronics : Notes By Debanjan Patra
Q. Given the following Boolean function: F = A′C + A′B + AB′ C + BC. Express it in product of maxterms.
Ans:
7
Digital Electronics : Notes By Debanjan Patra
Q. Simplify the following Boolean function F together with the don’t care conditions d; then express the
simplified function in sum of minterms.
f(x, y, z) = (0, 1, 2, 4, 5) ; d(x, y, z) = (3, 6, 7)
Ans: The given expression is:
f(x, y, z) = m (0, 1, 2, 4, 5) + d (3, 6, 7) [Since, f(x, y, z) = (0,1,2,4,5) ; d(x, y, z) = (3,6, 7)]
8
Digital Electronics : Notes By Debanjan Patra
f(xyz) = 0. (Answer)
Q. Minimize the following Using K-Map and Realize it with NAND 9 gates?
F(A,B,C,D) = m (2,3,4,5,13,15) + d (8,9,10,11)
Ans:
Given F(A,B,C,D) = m (2,3,4,5,13,15) + d (8,9,10,11)
_ _ _
F = (AD + BC + ABC). (Answer).
Q. Simply the following logic function using k-map and find the minterms & maxterms.
F(X,Y,Z)= XZ+ XYZ + YZ
Ans:
9
Digital Electronics : Notes By Debanjan Patra
AB _ _ _ _
C AB AB AB AB
_ _ _ _ _ _ _ __
C AB C AB C AB C A B C
1
__ _ _
C AB C AB C ABC ABC
1 1
AB AC
10
Digital Electronics : Notes By Debanjan Patra
_ _____
y = A + (B + C)
_________
= A . (B + C) [ by De Morgan’s law]
= A . (B + C)
Q. Obtain the truth table of the following & implement it by using NAND Gates?
F(A,B,C) = (AB+BC)(AC+BC)
Ans: The given expression is:
y = F(A,B,C) = (AB+BC)(AC+BC)
= ABC + ABC + ABC + BC [Since, a.a = a ]
= ABC + BC [Since, a + a = a]
_ _
= ABC + BC (A + A) [Since, A + A = 0]
_
= ABC + ABC + ABC
_
= ABC + ABC
_
= BC (A + A) _
= BC [ Since, A + A = 1]
ARITHMETIC CIRCUITS
11
Digital Electronics : Notes By Debanjan Patra
Q. Write the truth table of a Full Adder and then from it derive the circuit in terms of half adders.
Ans: Truth table of a Full Adder:
12
Digital Electronics : Notes By Debanjan Patra
This is 2-input 4-output combinational circuit. Now, from the diagram, it is clear that, for a particular input
combination only one output will become active and the others will remain inactive.
For example, when S1 & S2 = 0, then only D0 will become active. Similarly, for S1 = 0 & S2 = 1, D1 will become
active, and so on….
13
Digital Electronics : Notes By Debanjan Patra
Ans: Demultiplexer is a circuit (combinational circuit), that is used to distribute data which comes through a single
data line, into one of its various output line. The output line will be selected by the combination of select lines.
So, a demultiplexer have select lines and a data line as input.
But decoder is a circuit, that is used to decode any number to another form. Decoder have similar design as
demultiplexer but with one difference that decoder don’t have data line.
For example, the design of 1 to 8 demultiplexer is: -
14
Digital Electronics : Notes By Debanjan Patra
-- So by removing the data line of demux, the circuit will function as demux.
Ans: To design BCD to gray code converter, first we have to consider their respective conversion table: -
15
Digital Electronics : Notes By Debanjan Patra
16
Digital Electronics : Notes By Debanjan Patra
17
Digital Electronics : Notes By Debanjan Patra
2:1
MUX S
2:1
S MUX
2:1
MUX
S
2:1
MUX
S Output = Y
2:1
MUX
S
2:1
MUX
S
2:1
MUX
18
Digital Electronics : Notes By Debanjan Patra
19
Digital Electronics : Notes By Debanjan Patra
20
Digital Electronics : Notes By Debanjan Patra
FLIP FLOP
Q. Draw an S-R flip-flop using NOR gates and develop its truth table.
Ans:
(a) Logic diagram of basic S-R flip-flop circuit with NOR gates
21
Digital Electronics : Notes By Debanjan Patra
(b) Truth table of basic S-R flip-flop circuit with NOR gates
When a 1 is applied to both the set and reset inputs of the flip-flop in the Figure below, both Q and Q' outputs go to 0.
This condition violates the fact that both outputs are complement of each other. In normal operation this condition
must be avoided by making sure that 1's are not applied to both inputs simultaneously.
J K Q(next) Q Q(next) J K
0 0 Q 0 0 0 X
JK 0 1 0 Q(next) = JQ'+ K'Q 0 1 1 X
1 0 1 1 0 X 1
1 1 Q' 1 1 X 0
Q Q(next) D
D Q(next) 0 0 0
D 0 0 Q(next) = D 0 1 1
1 1 1 0 0
1 1 1
Q Q(next) T
T Q(next) 0 0 0
T 0 Q Q(next) = TQ'+T'Q 0 1 1
1 Q' 1 0 1
1 1 0
Each of these flip-flops can be uniquely described by its graphical symbol, its characteristic table, its characteristic
equation or excitation table. All flip-flops have output signals Q and Q'.
22
Digital Electronics : Notes By Debanjan Patra
Q. Discuss the Master Slave J-K flip flop with the help of suitable block diagram.
Ans: A master-slave flip-flop is constructed from two separate flip-flops. One circuit serves as a master and the other
as a slave. The logic diagram of an SR flip-flop is shown in the Figure given below. The master flip-flop is enabled on
the positive edge of the clock pulse CP and the slave flip-flop is disabled by the inverter. The information at the
external R and S inputs is transmitted to the master flip-flop. When the pulse returns to 0, the master flip-flop is
disabled and the slave flip-flop is enabled. The slave flip-flop then goes to the same state as the master flip-flop.
The timing relationship is shown in Figure herewith and is assumed that the flip-flop is in the clear state prior to the
occurrence of the clock pulse. The output state of the master-slave flip-flop occurs on the negative transition of the
clock pulse. Some master-slave flip-flops change output state on the positive transition of the clock pulse by having an
additional inverter between the CP terminal and the input of the master.
Q. Draw the circuit of an S-R Flip Flop using NAND gates only. From it derive the circuit of a D-Flip Flop
and explain its truth table.
Ans:
The D flip-flop shown in the given Figure bellow, is a modification of the clocked SR flip-flop. The D input goes
directly into the S input and the complement of the D input goes to the R input. The D input is sampled during the
23
Digital Electronics : Notes By Debanjan Patra
occurrence of a clock pulse. If it is 1, the flip-flop is switched to the set state (unless it was already set). If it is 0, the
flip-flop switches to the clear state.
From the truth table of the NAND based R- S flip flop and the logical diagram of the D flip flop it is clear that we can
omit the input (0 0) and (1 1) part of the truth table of the R-S flip flop as this case will not arise for the D flip flop. So
it’s truth table becomes as:
Q. How can you realize-the edge triggered J-K Flip Flop from an S-R Flip Flop? Write the truth table of J-K
Flip Flop and explain how race-around problem can be solved in it.
Ans: The state of a flip-flop is changed by a momentary change in the input signal. This change is called a trigger and
the transition it causes is said to trigger the flip-flop. The basic circuits require an input trigger defined by a change in
signal level. This level must be returned to its initial level before a second trigger is applied. Clocked flip-flops are
triggered by pulses.
The clock pulse goes through two signal transitions: from 0 to 1 and the return from 1 to 0. As shown in the Figure the
positive transition is defined as the positive edge and the negative transition as the negative edge.
A clocked JK flip-flop or edged triggered JK f/f is shown in the Figure below. Output Q is ANDed with K and CP
inputs so that the flip-flop is cleared during a clock pulse only if Q was previously 1. Similarly, output Q' is ANDed
with J and CP inputs so that the flip-flop is set with a clock pulse only if Q' was previously 1.
24
Digital Electronics : Notes By Debanjan Patra
The clocked flip-flops already introduced are triggered during the positive edge of the pulse, and the state transition
starts as soon as the pulse reaches the logic-1 level. If the other inputs change while the clock is still 1, a new output
state may occur. If the flip-flop is made to respond to the positive (or negative) edge transition only, instead of the
entire pulse duration, then the multiple-transition problem can be eliminated.
Note that because of the feedback connection in the JK flip-flop, a CP signal which remains a 1 (while J=K=1) after
the outputs have been complemented once will cause repeated and continuous transitions of the outputs. To avoid this,
the clock pulses must have a time duration less than the propagation delay through the flip-flop. The restriction on the
pulse width can be eliminated with a master-slave or edge-triggered construction. The same reasoning also applies to
the T flip-flop presented next.
By this process we can eliminate the race around condition.
25
Digital Electronics : Notes By Debanjan Patra
In most ways, the JK flip-flop behaves just like the RS flip-flop. The Q and Q' outputs will only change state on the
falling edge of the CLK signal, and the J and K inputs will control the future output state pretty much as before.
The master-slave flip-flop is essentially two back-to-back JKFFs, note however, that feedback from this device is fed
back both to the master FF and the slave FF.
Any input to the master-slave flip-flop at J and K is first seen by the master FF part of the circuit while CLK is High
(=1). This behaviour effectively "locks" the input into the master FF. An important feature here is that the complement
of the CLK pulse is fed to the slave FF. Therefore the outputs from the master FF are only "seen" by the slave FF
when CLK is Low (=0). Therefore on the High-to-Low CLK transition the outputs of the master are fed through the
slave FF. This means that the at most one change of state can occur when J=K=1 and so oscillation between the states
Q=0 and Q=1 at successive CLK pulses does not occur.
Q. Draw the circuit of an S-R Flip Flop using NOR gates. Write its truth table and explain why there is a
forbidden state. Is there any racing, if so explain it?
Ans: When a 1 is applied to both the set and reset inputs of the flip-flop in the Figure below, both Q and Q' outputs go
to 0. This condition violates the fact that both outputs are complements of each other. In normal operation this
condition must be avoided by making sure that 1's are not applied to both inputs simultaneously.
(a) Logic diagram of basic S-R flip-flop circuit with NOR gates
26
Digital Electronics : Notes By Debanjan Patra
(b) Truth table of basic S-R flip-flop circuit with NOR gates
Note that it is forbidden to have both inputs at a logic 1 level at the same time. That state will force both outputs to a
logic 0, overriding the feedback latching action. In this condition, whichever input goes to logic 0 first will lose
control, while the other input (still at logic 1) controls the resulting state of the latch. If both inputs go to logic 0
simultaneously, the result is a "race" condition, and the final state of the latch cannot be determined ahead of time.
This is the reason for which forbidden state will arise in S–R Flip-flop.
**Racing: An error condition in which two signals or sets of data collide. It can take place within a chip, a circuit, a
network or an application. It can be due to a timing malfunction in the hardware or poorly written software.
As because from the previous discussion we have seen that for the case where both the input of the S – R flip flop is
1,1 then there for the two outputs data is colliding, which is the reason of ambiguity of the output. So we can say that
though race around condition is not present here, but racing is present here.
MEMORY
2. Static memory allocation stores its data in the 2. Dynamic memory allocation stores its
‘data segment’ of the memory. memory on heap.
3. Static memory must be declared at compile-time. 3. It can be declared at run-time using the
‘new’ and ‘delete’ operators (or ‘malloc’ and
‘free’ in C).
27
Digital Electronics : Notes By Debanjan Patra
2. Sequential data storage devices, such as magnetic 2. File constructed in a manner in which
tape streamers, are widely used with computers to records may be placed in a random order;
back-up information stored on hard disk drives. The also called direct access file. Each record
tape streamers are fed information from the host in a random access file has associated with
computer in compliance with ANSI SCSI it a relative index number. Whenever a
specifications for sequential data. In the event of a record is read from a random access file, a
failure of the hard disk drive, the backed up computer program must produce a relative
information on the tape is transferred back to a index number for this record in order to
repaired hard drive. locate the record in the file.
28
Digital Electronics : Notes By Debanjan Patra
only memory, or ROM. Cassette audio and video tape, on the other hand, can be re-recorded (re-written) or purchased
blank and recorded fresh by the user. This is often called read-write memory.
Another distinction to be made for any particular memory technology is its volatility, or data storage permanence
without power. Many electronic memory devices store binary data by means of circuits that are either latched in a
"high" or "low" state, and this latching effect holds only as long as electric power is maintained to those circuits. Such
memory would be properly referred to as volatile. Storage media such as magnetized disk or tape is nonvolatile,
because no source of power is needed to maintain data storage. This is often confusing, because the volatile electronic
memory typically used for the construction of computer devices is commonly and distinctly referred to as RAM
(Random Access Memory). While RAM memory is typically randomly-accessed, so is virtually every other kind of
memory device in the computer. What "RAM" really refers to is the volatility of the memory, and not its mode of
access. Nonvolatile memory integrated circuits in personal computers are commonly (and properly) referred to as
ROM (Read-Only Memory), but their data contents are accessed randomly, just like the volatile memory circuits.
29
Digital Electronics : Notes By Debanjan Patra
because no source of power is needed to maintain data storage. This is often confusing, because the volatile electronic
memory typically used for the construction of computer devices is commonly and distinctly referred to as RAM
(Random Access Memory). While RAM memory is typically randomly-accessed, so is virtually every other kind of
memory device in the computer! What "RAM" really refers to is the volatility of the memory, and not its mode of
access. Nonvolatile memory integrated circuits in personal computers are commonly (and properly) referred to as
ROM (Read-Only Memory), but their data contents are accessed randomly, just like the volatile memory circuits.
30
Digital Electronics : Notes By Debanjan Patra
31