alfin K

I plan to use this place to document my work, keep short notes for easy reference and write about things I might forget.

Notes on Digital Circuits

In a cascaded 4 bit full adder setup what is the propogation delay?#

Find the propogation delay for 1 full adder and multiply by 4. For a full adder implementation the carry bit passess through two gates. So 8 is the answer.

Carry look ahead adder basic idea#

  • You essentially calculate the carry while adding so no delay.
  • If A and B are 1. Cout is always 1.
  • If Cin is 1, either A or B has to be 1 for Cout to be 1.
  • This means: Cout = AB + Cin*(A+B).
    • AB is called carry generator (Gi)
    • A + B is called carry propogate (Pi). You can also use A ^ B instead, since A and B both being 1 is already taken care off.
  • C(i+1) = Gi + Pi * Ci
  • After you find the carry just XOR with the Sum to get the final Sum.

Use XOR gates as control elements where you want either A or A'#

Hook up one input of the gate to A and the other to control signal.

  • A ^ 0 = A
  • A ^ 1 = A'

Turn an adder into a subtractor.#

You want the result as A-B. Which is same as A + B' + 1. (A + 2s compliment of B).

  • Supply 1 to C0.
  • Add inverter in the line of B.

Overflow and Carry#

  • Unsigned operation
    • For unsigned addition, if Cout=1 is invalid
    • For unsigned subtraction Cout=0 is invalid
  • Signed
    • For signed addition overflow is when Cin and Cout of the signed bit are not same. i.e OV = Cin ^ Cout.
    • The above rule also applies to subtraction.

Decoders#

  • Essentially a minterm generator.
  • Since you have access to all 2^n minterms, just OR them to get your desired function.

tip: If your function uses more than half the minterms, use a NOR gate instead of the OR. For n=3, say F=sum(1,2,3,4,5). Just feed the lines 6,7,8 into a NOR gate instead. You get the same function.

Standard decoders are active low (made using NAND instead of AND gates inside). Which means OR gates won't work to create the SOP(sum of products). Because AND-OR is same as NAND-NAND, replacing OR gates with NAND gates will create the same SOP of your function.