Skip to content

Latch as a Storage

The latch is a temporary storage built from several logic gates. Logic gate is an electronic component that outputs the value 0 or 1 base on the input. There are many types of logic gates, for example, AND Gates, OR Gates, NOR Gates, NAND Gates, or NOR Gates, XOR Gates, etc. Do they confuse you? Don’t be panic.

To construct a latch, we may use either NOR Gates or NAND Gates. Let’s starts by talking about the NAND Gates. NAND Gates means NOT-AND.

Truth Table for AND and NAND

Input 1Input2Output(AND)Output(NAND)
0001
0101
1001
1110

NAND’s output is opposed to the AND one.

How to implement a Latch using NAND Gates?

Truth table for NAND type Latch

S(Set)R(Reset)O(Output)O’
0011
0110
1001
11Keep UnchangedKeep Unchanged

But what is the principle here?

When S and R are both 0, the O and the wire p are 1. Then, the O’ and wire q are 1. This also leads O’ to be 1. However, in the Latch, O’ and O should not be in the same state. Therefore, This status is considered to be invalid.

When S is 0 and R is 1, O is 1. As wire p and input R is 1, O’ is 0.

When S is 1 and R is 0, O is 0. As wire p and input R is 0, O’ is 1.

When both S and R are 1, there is no change to wire p and wire q. Therefore, the state of O and O’ do not change. This is why this device can be used to store the data temporarily.

Now I am going to talk about the NOR type Latch.

Input 1Input2Output(OR)Output(NOR)
0001
0110
1010
1110

NOR Gate’s logic is opposed to the OR one.

The NOR Gates are interconnected in this way.

The truth Table for NOR type Latch

S(Set)R(Reset)O(Output)O’Remark
00Keep UnchangedKeep UnchangedUnchange
0101
1010
1100Invalid

By Comparison, 1 is considered to be active in the NOR type Latch whereas 0 is considered to be active in the NAND type Latch.

To represent the Latch, we may represent it in the following way!

When there is a bar on the top, it means that it is active low.

Also, to prevent the invalid status, we may add an inverter in the following way.

Also, we may add an enable pin to disable the input signal from amending the status of the latch.

Actually, these can be expressed as D-Flip-Flop

Next time, I will talk more about what can this D-latch use for!

Leave a Reply

  1. 1. No Commercial/Personal Promotion
  2. 2. Stick to the Topic
  3. 3. No Defamation
  4. 4. No Copyright Infringement
  5. 5. No Advocacy of Drug and Pornography

I reserve the right to ban your IP address if you violate these rules.

Your email address will not be published. Required fields are marked *