Half & Full Adder/Subtractor Circuits

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What type of circuit is designed using interconnected logic gates where the output depends only on the present input?

  • Micro
  • Sequential
  • Integrated
  • Combinational (correct)

Which logic gates are used to construct a half adder?

  • NAND and NOR
  • XOR and AND (correct)
  • AND and OR
  • OR and XOR

In a half adder, which gate produces the sum of the two input bits?

  • NOT
  • OR
  • XOR (correct)
  • AND

What is the carry output of a half adder when A=1 and B=1?

<p>1 (D)</p> Signup and view all the answers

How many inputs does a full adder have?

<p>3 (B)</p> Signup and view all the answers

Which gates are used to construct a full adder?

<p>Two XOR gates, two AND gates, and one OR gate (C)</p> Signup and view all the answers

In a half subtractor, which output represents the difference between the two input bits?

<p>Difference (C)</p> Signup and view all the answers

A half subtractor consists of XOR gate(s) and AND gate(s). How many of each?

<p>One XOR gate and one AND gate (B)</p> Signup and view all the answers

What type of digital circuit is a half subtractor?

<p>Combinational logic circuit (D)</p> Signup and view all the answers

Which of the following is an application of half subtractors?

<p>All of the above (D)</p> Signup and view all the answers

What are the inputs to a half subtractor?

<p>Minuend and subtrahend (C)</p> Signup and view all the answers

A combinational circuit that converts binary information into $2^N$ output lines is known as what?

<p>Decoder (A)</p> Signup and view all the answers

Which of the following is a limitation of half subtractors?

<p>They can only subtract two bits at a time. (B)</p> Signup and view all the answers

What are the outputs of a full subtractor?

<p>Difference and Borrow-out (C)</p> Signup and view all the answers

What is the primary function of a full subtractor?

<p>Subtraction of two bits (A)</p> Signup and view all the answers

In a full subtractor, what does 'Bin' represent?

<p>Borrow-in (A)</p> Signup and view all the answers

What is the main function of a demultiplexer?

<p>To direct a single input line to one of several output lines. (B)</p> Signup and view all the answers

What is a key characteristic of sequential circuits?

<p>They use previous state information to determine their next state. (D)</p> Signup and view all the answers

What is the primary function of a flip-flop?

<p>To store one bit of information. (C)</p> Signup and view all the answers

Which logic gates can be used to construct an SR flip-flop?

<p>NAND gates, or a combination of NOR and AND gates (B)</p> Signup and view all the answers

Which of the following is an application of SR flip-flops?

<p>Data storage in memory (A)</p> Signup and view all the answers

What is another name for a D flip-flop?

<p>Data flip-flop (A)</p> Signup and view all the answers

What is required for the synchronous version of D flip flops?

<p>A clock signal (D)</p> Signup and view all the answers

What is the purpose of the clock input in a synchronous D flip-flop?

<p>To control when the flip-flop stores data. (D)</p> Signup and view all the answers

What is the purpose of a JK flip-flop?

<p>To store binary information. (D)</p> Signup and view all the answers

In a synchronous mode of JK flip-flop operation, what triggers the change of state?

<p>The clock signal. (D)</p> Signup and view all the answers

What does the 'T' stand for in 'T flip-flop'?

<p>Toggle (B)</p> Signup and view all the answers

What is the primary function of a decoder?

<p>To perform the reverse operation of an encoder. (A)</p> Signup and view all the answers

What is the main characteristic of a T flip-flop?

<p>It can toggle its output depending on the input. (B)</p> Signup and view all the answers

How many output lines does a De-multiplexer with 1 input line have?

<p>$2^N$ output lines (A)</p> Signup and view all the answers

What is the function of an encoder?

<p>It performs the reverse operation of a decoder. (A)</p> Signup and view all the answers

What is the purpose of connecting multiple flip-flops?

<p>To store multiple bits of data. (D)</p> Signup and view all the answers

What is a register used for in digital circuits?

<p>Storing information. (C)</p> Signup and view all the answers

In a 4 to 2 encoder, if input Y2 is '1' and all other inputs are '0', what will be the output A1 A0?

<p>1 0 (A)</p> Signup and view all the answers

What operation is equivalent to shifting a binary number to the left by one position?

<p>Multiplying the number by 2 (B)</p> Signup and view all the answers

How many select lines are required for a multiplexer with 8 input lines?

<p>3 (D)</p> Signup and view all the answers

Which of the following is a type of shift register?

<p>Serial In Serial Out shift register (D)</p> Signup and view all the answers

What is another name for a multiplexer?

<p>&quot;N-to-1 selector&quot; (D)</p> Signup and view all the answers

What logic gates are used to implement the boolean functions A1 = Y3 + Y2 and A0 = Y3 + Y1 in a 4 to 2 encoder?

<p>OR gates (D)</p> Signup and view all the answers

In a 2x1 multiplexer, how many selection lines are there?

<p>1 (C)</p> Signup and view all the answers

What is the maximum count a binary counter with n bits can reach?

<p>2<sup>n</sup> - 1 (D)</p> Signup and view all the answers

Which type of binary counter is also known as a ripple counter?

<p>Asynchronous Counter (A)</p> Signup and view all the answers

In an asynchronous counter, how are the flip-flops triggered?

<p>By the output of the previous flip-flop (B)</p> Signup and view all the answers

Which type of counter experiences propagation delay?

<p>Asynchronous Counter (A)</p> Signup and view all the answers

What is a key characteristic of a synchronous counter?

<p>Flip-flops receive the same clock pulse simultaneously (D)</p> Signup and view all the answers

Flashcards

Half Subtractor

Subtracts two bits, producing a difference and a borrow.

Half Subtractor: Difference (D)

D = A XOR B

Half Subtractor: Borrow (B)

B = NOT A AND B

Full Subtractor

Subtracts two bits and a borrow-in, producing a difference and borrow-out.

Signup and view all the flashcards

Decoder

A combinational circuit that converts binary information into 2N output lines.

Signup and view all the flashcards

Full Subtractor Inputs/Outputs

Takes inputs: minuend (A), subtrahend (B), borrow-in (Bin); Outputs: difference (D), borrow-out (Bout).

Signup and view all the flashcards

Full Subtractor Applications

Used in ALUs, CPUs, GPUs, DSPs, etc.

Signup and view all the flashcards

Full Subtractor Implementation

Two half subtractors cascaded, handling borrow-in and generating final difference and borrow-out.

Signup and view all the flashcards

Combinational Circuit

Circuit where output depends only on current inputs, without memory or clock.

Signup and view all the flashcards

Half Adder

Adds two single-bit binary numbers, producing a sum and carry.

Signup and view all the flashcards

Half Adder Equations

Sum = A XOR B, Carry = A AND B

Signup and view all the flashcards

Full Adder

A circuit that adds three inputs (A, B, Carry-In) and outputs a sum and Carry-Out.

Signup and view all the flashcards

Full Adder Equations

SUM = (A XOR B) XOR Cin, CARRY-OUT = A.B + Cin(A XOR B)

Signup and view all the flashcards

Half Subtractor Equations

D = A XOR B; B = (!A) AND B

Signup and view all the flashcards

Half Subtractor Truth Table

A:0, B:0, D:0, B:0; A:0, B:1, D:1, B:1; A:1, B:0, D:1, B:0; A:1, B:1, D:0, B:0

Signup and view all the flashcards

4 to 2 Encoder

An encoder with 4 inputs and 2 outputs, where only one input is active at a time.

Signup and view all the flashcards

Multiplexer (Mux)

A combinational circuit with multiple data inputs and a single output, controlled by select inputs. Also known as a “N-to-1 selector.”

Signup and view all the flashcards

2x1 Multiplexer

A multiplexer that chooses one signal from two inputs and transmits it to the output.

Signup and view all the flashcards

De-multiplexer

A combinational circuit with one input line and 2^N output lines, directing the input to one of the outputs.

Signup and view all the flashcards

Y3, Y2, Y1, Y0

The inputs to a 4 to 2 encoder

Signup and view all the flashcards

A1 and A0

The outputs from a 4 to 2 encoder

Signup and view all the flashcards

Binary Counter

A sequential logic circuit that counts in binary numbers.

Signup and view all the flashcards

Binary Counter Range

Counts from 0 to 2^(n-1), where n is the number of bits.

Signup and view all the flashcards

Asynchronous Counter

A counter where flip-flops don't receive the same clock pulse simultaneously; also known as a ripple counter.

Signup and view all the flashcards

Asynchronous Counter Delay

Counters suffer from propagation delay because each flip flop is triggered by the output of the previous flip flop.

Signup and view all the flashcards

Synchronous Counter

A counter where all flip-flops receive the same clock pulse simultaneously, eliminating propagation delay.

Signup and view all the flashcards

Sequential Circuit

Digital circuits that use past input to determine the next state.

Signup and view all the flashcards

Flip-Flop

Electronic component that stores a single bit of information.

Signup and view all the flashcards

SR Flip Flop Construction

Can be constructed using NAND or NOR gates.

Signup and view all the flashcards

SR Flip Flop Applications

Creating registers, counters, memory, and synchronous systems

Signup and view all the flashcards

D Flip Flop

Flip-flop also know as “delay flip flop” or “data flip flop” which is used to store single bit of data.

Signup and view all the flashcards

Synchronous D Flip Flop

Requires a clock signal for synchronous operation.

Signup and view all the flashcards

D Flip Flop Inputs

Has two inputs: data and clock.

Signup and view all the flashcards

JK Flip-Flop

A sequential logic circuit that stores binary information bitwise, featuring Set(J) & Reset(K) inputs, and Q & Q' outputs.

Signup and view all the flashcards

Register

A group of flip-flops connected to store multiple bits of data.

Signup and view all the flashcards

Shift Register

A register that can transfer information stored within it.

Signup and view all the flashcards

Serial In Serial Out (SISO)

Data enters serially, exits serially.

Signup and view all the flashcards

Serial In Parallel Out (SIPO)

Data enters serially, exits in parallel.

Signup and view all the flashcards

Bidirectional Shift Register

A shift register that can shift data in either direction.

Signup and view all the flashcards

Bidirectional Shift Register with Parallel Load

Shift register allowing data to be loaded in simultaneously and shifted in either direction.

Signup and view all the flashcards

Study Notes

Combinational Circuits

  • Designed using multiple interconnected logic gates.
  • Output is generated by computing the logical combinations of the present input only.
  • No clock pulse is present.

Half Adder

  • Combinational logic circuit.
  • Designed by connecting one EX-OR gate and one AND gate.
  • Has two inputs (A and B)
  • Adds those two inputs and generate a carry and a sum.
  • Output from the EX-OR gate is the sum.
  • Output from the AND gate is the carry.
  • There will be no forwarding of carry addition because there is no logic gate to process that.

Logical Expression

  • Sum = A XOR B
  • Carry = A AND B

Truth Table

Input A Input B Output Sum Output Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

Full Adder

  • A circuit comprised of two EX-OR gates, two AND gates, and one OR gate.
  • Adds three inputs
  • Produces two outputs.
  • First two inputs are A and B
  • The third input is an input carry as C-IN.
  • Output carry is designated as C-OUT
  • The normal output is designated as S (SUM).
  • The equation obtained by the EX-OR gate is the sum of the binary digits.
  • The output obtained by AND gate is the carry obtained by addition.

Logical Expression

  • SUM = (A XOR B) XOR Cin = (A⊕ B) ⊕ Cin
  • CARRY-OUT = A AND B OR Cin(A XOR B) = A.B + Cin(AB)

Truth Table

Input A Input B Input Cin Output Sum Output Carry
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

Subtractor

  • A half subtractor is a combinational logic circuit that performs the subtraction of two bits.
  • It serves as a foundational element for a full subtractor.
  • Used in various digital circuits.

Truth Table for Half Subtractor

Input A Input B Output Difference (D) Output Borrow (B)
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 1
  • Half subtractor consists of two XOR gates and one AND gate.
  • XOR gates are used to calculate the difference between the two input bits
  • AND gate is used to calculate the borrow.
  • D = A XOR B
  • B = A AND B

Applications

  • Full subtractors
  • Adders
  • Comparators
  • Decoders
  • Encoders
  • Multiplexers
  • Demultiplexers

Advantages

  • Simple in design and implementation
  • Inexpensive to manufacture.

Disadvantages

  • Can only subtract two bits at a time.
  • Subtracting larger numbers requires cascading multiple half subtractors.

Full Subtractor

  • Combinational logic circuit

Inputs

  • Minuend (A)
  • Subtrahend (B)
  • Borrow-in (Bin) from the previous stage.

Outputs

  • Difference (D)
  • Borrow-out (Bout).

Truth Table for Full Subtractor

A B Bin D Bout
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
  • Consists of two half subtractors connected in cascade
  • First half subtractor subtracts the subtrahend (B) from the minuend (A)
  • Second half subtractor subtracts the borrow-in (Bin) from the difference (D) of the first half subtractor.

Outputs

  • First half subtractor creates Difference (D) and borrow-out (Bout1)
  • Second half subtractor produces the final difference (D) and the final borrow-out (Bout).

Applications

  • Arithmetic logic units (ALUs)
  • Central processing units (CPUs)
  • Graphics processing units (GPUs)
  • Digital signal processors (DSPs)
  • Essential component of many digital circuits.

Decoder

  • Combinational circuit, changes the binary information into 2^N output lines.
  • Binary information is given in the form of N input lines.
  • The output lines define the 2-bit code for the binary information.
  • Performs the reverse operation of the Encoder.
  • At a time, only one input line is activated for simplicity.
  • The produced 2^N-bit output code is equivalent to the binary information.

Encoder

  • Combinational circuit.
  • Performs the reverse operation of a Decoder.
  • Has a maximum of 2^n input lines and 'n' output lines.
  • Encoders encode the information from 2^n inputs into an n-bit code.
  • A binary code equivalent to the input, which is active High, will be produced.
  • The encoder encodes 2^n input lines with 'n' bits.

Types

  • 4 to 2 Encoder
  • Octal to Binary Encoder (8 to 3 Encoder)
  • Decimal to BCD Encoder
  • Priority Encoder

4 to 2 Encoder

  • Consists of four inputs (Y3, Y2, Y1, YO)
  • Consists of two outputs (A1, A0).
  • At any time, only one of these 4 inputs can be '1' in order to get the respective binary code at the output.
Input Y3 Input Y2 Input Y1 Input Y0 Output A1 Output A0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1

Logical Expression

  • A1 = Y3 + Y2
  • A0 = Y3 + Y1
  • A1 and A0 can be implemented using two input OR gates

Multiplexers

  • Combinational circuit.
  • Has many data inputs and a single output, based on control or select inputs.
  • N input lines require log2(N) selection lines, or equivalently, 2^n input lines require n selection lines.
  • Multiplexers are also known as "N-to-1 selectors,” parallel-to-serial converters, many-to-one circuits, and universal logic circuits.
  • Increase the amount of data that can be delivered over a network within a certain amount of time and bandwidth.

2:1 Multiplexer

  • Fundamental circuit also known as 2-to-1 multiplexer.
  • Used to choose one signal from two inputs and transmits it to the output.
  • Contains two input lines, one output line, and a single selection line.

Truth Table

Selection Input S₀ Input I₀ Input I₁ Output Y
0 X 0 0
0 X 1 1
1 0 X 0
1 1 X 1

De-multiplexer

  • Combinational circuit with only 1 input line and 2^N output lines.
  • Single-input and multi-output combinational circuit.
  • The info is received from the single input lines and directed to the output line.
  • The input will be connected to one of these outputs, based on the values of the selection lines.
  • Opposite to the multiplexer.

Truth Table

Selection Input S₀ Input A Output Y₁ Output Y₀
0 A 0 A
1 A A 0

Logical Expression

  • Y₀ = S₀' . A
  • Y₁ = S₀ . A

Sequential Circuit

  • Digital circuits that store and use previous state information to determine their next state.
  • Commonly used in digital systems to implement state machines, timers, counters, and memory elements.
  • Essential components in digital systems design.
  • Memory elements in sequential circuits are implemented using flip-flops.
  • Flip-flops are circuits that store binary values and maintain their state even when the inputs change.

Flip-Flop

  • Electronic component used to store one single bit of information.

SR Flip Flop

  • Can be constructed in two ways
  • With 2 NOR Gates + 2 AND Gates
  • With 4 NAND Gates.

Applications

  • Register: SR Flip Flop used to create register.
  • Counters: SR Flip Flops used in counters. Counts the number of events that occurs in a digital system.
  • Memory: SR Flip Flops used to create memory which are used to store data, when the power is turned off.
  • Synchronous System: SR Flip Flop are used in synchronous system which are used to synchronize the operation of different component.

D Flip Flop

  • Electronic device known as “delay flip flop" or "data flip flop".
  • Stores a single bit of data.
  • D flip flops are synchronous or asynchronous.
  • Two inputs: data and clock.
  • Clock input high: data is transferred to the output of the flip flop.
  • Clock input low: the output of the flip flop is held in its previous state.

JK Flip-Flop

  • Sequential logic circuit stores binary information in bitwise manner.
  • Two inputs: Set(J) & Reset(K)
  • Two outputs: Q and Q'.
  • Has two modes of operation: synchronous and asynchronous.
  • Synchronous mode: The state will be changed with the clock(clk) signal.
  • Asynchronous mode: The change of state is independent from its clock signal.

T Flip Flop

  • Known as Toggle Flip Flop
  • Able to toggle its output depending upon on the input.
  • 'T' stands for Toggle
  • Toggle basically indicates that the bit will be flipped (1 to 0 or 0 to 1).
  • A clock pulse is supplied to operate this flop, hence it is a clocked flip-flop.

Can be constructed in three ways

  • By using SR Flip Flops.
  • By using D Flip Flops.
  • By using JK Flip Flops

Resistor

  • Flip flops can be used to store a single bit of binary data (1 or 0).
  • In order to store multiple bits of data, multiple flip-flops are needed.
  • N flip flops are to be connected in order to store n bits of data

Shift Resistor

  • This is a device used to store such information.
  • It is a collection of flip-flops linked in series to store several bits of data.
  • Shift registers are used to move the data that has been stored inside these registers.

Types of Shift Resistors:

  • Serial In Serial Out shift register
  • Serial In parallel Out shift register
  • Parallel In Serial Out shift register
  • Parallel In parallel Out shift register
  • Bidirectional Shift Register
  • Universal Shift Register
  • Shift Register Counter

Bidirectional Shift Register with parallel load

  • A binary number shifted to the left by one position is equivalent to multiplying it by 2.
  • A binary number shifted to the right by one position is equivalent to dividing the number by 2.
  • In order to perform these operations we need a register which can shift the data in either direction.

Binary counter

  • A type of sequential logic circuit in digital electronics that can count in binary numbers.
  • A binary counter can counter from 0 to 2^(n-1), where n is the total number of bits in the counter.

Asynchronous Counter

  • A type of binary counter.
  • Flip flops do not receive the same clock pulse at the same time.
  • Also known as ripple counter (simplest type of binary counter).
  • In asynchronous counters, each flip flop is triggered by the output of the previous flip flop, thus, suffer from propagation delay.

Synchronous Counter

  • All the flip flops receive the same clock pulse at the same time.
  • Since all flip flops are triggered by the same clock pulse, their outputs change simultaneously.
  • Result is little to no propagation delay between the flip flops.

4-bit Binary Synchronous Counter

  • Comprises four JK flip-flops
  • Represents an M=2 4-bit binary synchronous counter.
  • The counting pulse N is simultaneously applied to the clock pulse input CP terminal of each flip-flop.
  • When the counting pulse arrives: all the flip-flops are triggered simultaneously and the state of each subsequent flip-flop is determined by the current state of its preceding flip-flop.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser