Yunai

順序回路Sequential circuits

半加算器の時と同じ2つの入力に加えて、下の桁の繰り上がりがあった場合の入力 $C’$を設ける。

C: c of carry桁あがりした2桁目の数に当たる出力

S: SumのS.1桁目の数に当たる出力

$$ \text{Input(A,B,C’)}\longmapsto \text{Full Adder} \longmapsto \text{Output(C,S)} $$

最大出力は$$1+1=11$$である。よって、出力は2つでも大丈夫。

Registers

Counters

Shift Registers

Finite State Machines (FSMs)

Latches

Yes, there are several types of latches other than the SR latch. Here are the most common ones:

1. D Latch (Data or Delay Latch)

2. JK Latch

3. T Latch (Toggle Latch)

4. Gated SR Latch

This circuit is called an “SR latch.” Specifically, it is an SR latch that uses NAND gates.

These latches serve as the foundation for more complex storage elements in digital electronics, such as flip-flops, which are edge-triggered versions of latches.

RS Flip-flop

使う時のイメージ

  1. SetかResetを入力。あるいはどちらも入力しない。どちらも入力しない、というのはしないという同意がある(どちらも入力したら値が定まらないため)。
  2. そのまま($Q$)か否定($\bar{Q}$)かを出力
    1. Setを入力→$Q$
    2. Resetを入力→$\bar{Q}$

Reset, Setという二つのsignal-patternで、記憶させる値を切り替える。

SRQ
1010
0101
00QHolds Value
11?Undefined
graph TB
    S((Set)) --> A[NOT]
    R((Reset)) --> B[NOT]
    A --> C[NAND] 
    B --> D[NAND]
    C -- Q --> E((Q))
    D -- Qnot --> F((Q̅))
    C -- feedback1 --> D
    D -- feedback2 --> C

    style A fill:#f9f,stroke:#333,stroke-width:2px;
    style B fill:#f9f,stroke:#333,stroke-width:2px;
    style C fill:#bbf,stroke:#333,stroke-width:2px;
    style D fill:#bbf,stroke:#333,stroke-width:2px;
graph TB
    S["Set (S)"] --> A[NOT]
    R["Reset (R)"] --> B[NOT]
    A --> C[NAND]
    B --> D[NAND]
    C -- "Q" --> E["Output Q"]
    D -- "Q̅" --> F["Output Q̅"]
    C -- feedback1 --> D
    D -- feedback2 --> C

    style A fill:#f9f,stroke:#333,stroke-width:2px;
    style B fill:#f9f,stroke:#333,stroke-width:2px;
    style C fill:#bbf,stroke:#333,stroke-width:2px;
    style D fill:#bbf,stroke:#333,stroke-width:2px;

For the first image:

graph TB
    S1((S = 1)) --> A1[NOT]
    R0((R = 0)) --> B1[NOT]
    A1 --> C1[NAND]
    B1 --> D1[NAND]
    C1 -- "Q = 1" --> E1((Q = 1))
    D1 -- "Q̅ = 0" --> F1((Q̅ = 0))
    C1 -- feedback1 --> D1
    D1 -- feedback2 --> C1

    style A1 fill:#f9f,stroke:#333,stroke-width:2px;
    style B1 fill:#f9f,stroke:#333,stroke-width:2px;
    style C1 fill:#bbf,stroke:#333,stroke-width:2px;
    style D1 fill:#bbf,stroke:#333,stroke-width:2px;

For the second image:

graph TB
    S0((S = 0)) --> A2[NOT]
    R1((R = 1)) --> B2[NOT]
    A2 --> C2[NAND]
    B2 --> D2[NAND]
    C2 -- "Q = 0" --> E2((Q = 0))
    D2 -- "Q̅ = 1" --> F2((Q̅ = 1))
    C2 -- feedback1 --> D2
    D2 -- feedback2 --> C2

    style A2 fill:#f9f,stroke:#333,stroke-width:2px;
    style B2 fill:#f9f,stroke:#333,stroke-width:2px;
    style C2 fill:#bbf,stroke:#333,stroke-width:2px;
    style D2 fill:#bbf,stroke:#333,stroke-width:2px;

English Translation: