DLD QA

Created by
BBorhan
Last edited time
Tag

Digital System

Q:

A:

Advantages:

Disadvantages:

AspectAnalog SystemDigital System
Data RepresentationContinuous, varying physical quantitiesDiscrete, quantized values
Precision and AccuracyInfinite precision, potential loss of accuracyPrecise and accurate representation, no loss due to noise
Signal ProcessingContinuous mathematical operationsDiscrete operations using algorithms and logical operations
Storage and ReproductionStored and reproduced directly in original formEncoded in binary codes for storage and reproduction
Flexibility and ManipulationLimited flexibility and manipulationHigh flexibility and easy manipulation with software algorithms
Compatibility and IntegrationLimited integration of different media typesSeamless integration of various media types
Signal QualitySusceptible to degradation and interferenceMore resistant to noise and preserves signal quality
ApplicationsAudio processing, music production, specific sensorsComputers, telecommunications, image processing, data storage

NAND and NOR gate

Q:

A:

The universality of NAND (Not-AND) gates and NOR (Not-OR) gates refers to the fact that these two types of logic gates can be used to implement any logical function. In other words, any other logic gate or combination of gates can be created using only NAND gates or only NOR gates.

FF

Q:

A:

LatchFlip-Flop
DefinitionA latch is a level-sensitive sequential logic circuit used to store and maintain a binary state.A flip-flop is a clocked sequential logic circuit used to store and control binary data
TypeAsynchronousSynchronous
Enable InputYesNo
SensitivityLevel-sensitiveEdge-sensitive
Clock DependencyNo clock inputClock input required
Output UpdateImmediate response to input changesUpdates at specific clock transitions
Output StabilityOutput changes based on current inputsOutput changes based on clock edges
ApplicationsSmall-scale circuits, building blocks, data storage Processors, memory elements, state machines, register
Input ControlNo clock signal requiredSynchronized with a clock signal
StatesSet and resetSet, reset, and intermediate states
J-K Flip-FlopS-R Flip-Flop
InputsJ (data input), K (data input), ClockS (set input), R (reset input), Clock
FunctionalityStores and manipulates binary dataStores and manipulates binary data
OperationJ-K inputs control the behavior of FFS-R inputs control the behavior of FF
FeedbackCan have feedback (J and K connected to FF)No feedback (S and R not connected to FF)
Forbidden StateNoneS = 1, R = 1 results in an undefined state
ImplementationCan be implemented using logic gatesCan be implemented using logic gates
ApplicationsCounters, shift registers, memory elementsMemory elements, control circuits
Toggle StateYesNo

Internal circuitry of the edge-triggered J-K.
Truth Table for JK FF

D FF using JK

  • A T flip-flop, also known as a toggle flip-flop, is a type of sequential logic circuit that can change its output state based on clock pulses.
Truth Table of D FF
T FF using JK

Truth Table of T FF

SR/SC FF
SR/SC FF

BCD

Q:

A:

Advantage:

Disadvantage:

BCD adder circuit that contains two four bit adders and a circuit detector

Four Bit BCD Adder Operation:

Correction Detector Circuit Operation

Design a 7 segment BCD counter

To print “8”

  1. BCD Input : 1000
  1. Decoder Operation :
    1. Set high to activate : a,b,c,d,e,f,g,h
  1. Display Operation:
    1. the activated output lines will turn on these segments

Circuit Diagram
Wave form

Counter

Frequency Division: Frequency division is a technique used to divide an input frequency by a certain factor to obtain a lower frequency output. The mod-8 counter divides by a factor of 8. That means, for every 8 input clock cycle, the counter will produce one output clock cycle. The output frequency is equal to the input frequency divided by 8.

Counting Operation: The MOD-8 counters starts from 0 to 7 and then reset back to 0.

Multiplexer

FeatureMultiplexerDemultiplexer
PurposeCombines multiple input signals into one outputSplits one input signal into multiple outputs
FunctionSelects one of the input lines based on control signalsDistributes the input signal to the selected output line based on control signals
Input LinesMultiple input linesSingle input line
Output LinesSingle output lineMultiple output lines
Control SignalsUsed to select the desired input lineUsed to select the desired output line
DefinitionA multiplexer, often referred to as a mux, is a digital circuit that combines multiple input signals into a single output line based on control signals.A demultiplexer, often abbreviated as demux, is a digital circuit that takes a single input signal and distributes it to one of several possible output lines based on the control signals provided.

Some important notes:

  • A 5-bit DAC has a current output. For a digital input of 10100, an output current of 10 mA is produced. What will IOUT be for a digital input of 11101?

    Solution: 10100= 20

    IOUT =10 mA

    Proportionality factor= 0.5

    [K=10mA/20=0.5mA or 20×0.5mA=10 mA]

    Now, 11101=29

    IOUT= 29×0.5= 14.5 mA

    • If asked for the largest input/output → 11111 = 31 (5 bit)
  • 3 excess code

    BCD code of the Number + 0011 = 3 excess code

  • Binary to Gray Code
    • MSB = MSB
    • ii  th bit = (i)(i) XORXOR (i1)i-1)

    (Start from right, not mandatory)

  • Gray to Binary Code
    • Write the MSB , SUM = MSB
    • ithi -th bit = SUM + ithi-th  bit
    • SUM = ithi-th  bit (Neglect the carry)
  • Comparison between Encoder and Decoder
AspectEncoderDecoder
PurposeConverts input data into a compressed representation or code.Reconstructs the original input data from the compressed representation or code.
InputRaw data or information to be encoded.Encoded representation or code to be decoded.
OutputEncoded representation or code.Decoded output, which is a reconstruction of the original input data.
FunctionalityExtracts relevant features and patterns from the input data.Utilizes the encoded representation to reconstruct the original data.
ArchitectureTypically involves layers such as convolutional layers, pooling layers, and fully connected layers.Often mirrors the architecture of the encoder but in reverse order.
TrainingTrained using unsupervised learning techniques like autoencoders or generative models.Trained alongside the encoder using the same dataset and loss function.
ApplicationsImage and video compression, anomaly detection, feature extraction.Image and video reconstruction, machine translation, text generation.
  • 32X4 and 64X4 RAM internal organization
64x4 RAM32x4 RAM
Number of Address Lines65
Number of Data Lines44
Number of Memory Locations6432
Number of Bits per Location44
Address DecoderDecodes 6 address lines to select one of 64 memory locationsDecodes 5 address lines to select one of 32 memory locations
Storage CellsConsists of 64 storage cells, each capable of holding 4 bits of dataConsists of 32 storage cells, each capable of holding 4 bits of data
Read/Write ControlDetermines whether to read or write data from/to the selected memory locationDetermines whether to read or write data from/to the selected memory location
  • Half adder

A Half Adder is a combinational circuit that adds two single-bit binary numbers (A and B) and produces two outputs: the sum (S) and the carry (C).

Sum = AB A ⊕ B 

Carry = ABAB

  • Full Adder

A Full Adder is a combinational circuit that adds three single-bit binary numbers: A, B, and a carry input (C ), and produces two outputs: the sum (S) and the carry (C_out).

Carry = AB+(AB)C AB + (A ⊕ B)C

Sum = ABCA ⊕ B ⊕ C

ABCSUMCarry
00000
00110
01010
01101
10010
10101
11001
11111

  • Even Parity Generator XX: ABC.......A \oplus B \oplus C ....\oplus ...
  • Odd Parity Generator : Xˉ\bar X Where, X=ABC.......X = A \oplus B \oplus C ....\oplus ...
  • Even Parity Checker : Y=ABC.......PY = A \oplus B \oplus C ....\oplus ...P, PP = Parity Bit
  • Odd Parity Checker : Yˉ\bar Y
  • Ripple Up Counter

  • Ripple Down Counter
  • Decoder as Demultiplexer

  • What are the differences between combinational and sequential circuits?
Combinational CircuitsSequential Circuits
FeedbackNo feedback involvedFeedback is involved
MemoryNo memoryHas memory
OutputDepends only on current inputsDepends on current inputs and past history
Design ComplexityEasierComplex
OperationPerforms logic operations such as addition, subtraction, etc.Builds memory elements, counters, shift registers, etc.
ExamplesLogic gates, multiplexers, decoders, addersFlip-flops, registers, memory units, counters, etc.
  • 16x4 ⇒ 32x4

  • Gather the necessary components
  • Gather the necessary components
  • Connect the address lines
  • Connect the data lines
  • Connect the control signals
  • Mount the chips
  • Verify connections
  • Test the memory

  • RAM block Diagram

CT 01 & Random :

  • Draw the timing diagram for a signal that alternates between 0.3V (binary 0) for 5ms and 3.9 V (binary 1) for 2ms
  • What is the weight of MSB of 16-bit number?

    2152^{15}

  • What is the weight of LSB of 16-bit number?

    202^0

  • B2F to Decimal

Keynote:

Number System Conversion

Any to Decimal → Multiply By BaseMultiply \space By \space Base

Decimal to Any → Devide By BaseDevide \space By \space Base

  • Four numbers in HEX counting after E9D

    E9E, E9F, EA0, EA1..

  • Attach an even parity for bit to the BCD code for decimal 69

  • Why can't parity method detect a double error transmitted data ?
  1. Single-bit Error: The even parity method can detect single-bit errors because any change in a single bit will result in an odd number of 1s, which will cause the parity check to fail. This allows for the detection of errors during transmission.
  1. Double Errors: However, if two bits are flipped (a double error), it is possible for the resulting pattern to have the same parity as the original correct data. For example, let's say the original data had even parity, and two bits were inverted, resulting in another valid pattern with even parity. In this case, the parity check will not detect the double error because the total number of 1s remains even.

Since the parity method checks for odd or even parity based on a count of 1s, it cannot differentiate between a correct pattern and certain combinations of double errors that maintain the same parity. This limitation makes the parity method ineffective at detecting such multiple errors.

Simplification of Expressions

1. De Morgan's theorem for three variables: (x + y + z)' = x'y'z' and (xyz)' = x' + y' + z'

K-map

CT 02: