Adders and flip-flops
도입됨
14:50
RISC, 파이프라인 및 논리 회로
두 칩 설계자가 프로그램을 빠르게 실행해야 한다는 같은 문제에 직면합니다. 한 사람은 각 명령이 많은 일을 하도록 강력한 명령어를 만들자고 합니다. 다른 사람은 단순하게 유지하자고 합니다…
영어 내레이션 · 영어와 중국어 자막 전환 가능
이 수업의 내용
| English | 의미 |
|---|---|
| processor/ˈprəʊsesə/ | The component that executes instructions and performs the operations of a computer or similar system. |
| adder/ˈædə/ | A logic circuit that adds binary numbers. |
| gates | Electronic components that produce an output from one or more binary inputs. |
| sum digit | The digit written in one column after adding the bits and any carry-in. |
| carry/ˈkæri/ | _Handle |
| half adder/hɑːf ˈædə/ | 반 더러 |
| full adder/fʊl ˈædə/ | 전가기 |
| carry-in | A bit carried from the column to the right into an addition. |
| bit/bɪt/ | A binary digit, taking the value zero or one. |
| memory/ˈmeməri/ | Circuits that store data, such as registers, RAM and ROM. |
| flip-flop/flɪp flɒp/ | 플립플롭 |
| sum/sʌm/ | The bit produced in the current column when binary bits are added. |
| binary addition | The process of adding numbers written using the digits zero and one. |
| carry-out | A bit carried from an addition to the next column on the left. |
| ripple-carry adder/ˈrɪpl ˈkæri ˈædə/ | 리플-캐리 가산기 |
| 4-bit adder | A circuit that adds two binary numbers with four bits each. |
| bistable/baɪˈsteɪbl/ | 이안정 회로 |
| circuit/ˈsɜːkɪt/ | A complete path through which electric current can flow. |
| registers/ˈredʒɪstəz/ | A small, fast storage location within a processor used to hold data, addresses or instructions temporarily. |
| counters/ˈkaʊntəz/ | 카운터 |
| SRAM/ˈesræm/ | A type of RAM that uses flip-flops to store bits without needing refresh. |
| cells/selz/ | Small parts of memory that each store a bit of data. |
| SR flip-flop/ˌes ˈɑː flɪp flɒp/ | SR 플립플롭 |
| set/set/ | To make the output Q of a flip-flop become 1. |
| reset | To make the output Q of a flip-flop become 0. |
| cross-coupled NOR gates | Two NOR gates connected so each output feeds into the other gate's input. |
| JK flip-flop/ˌdʒeɪ ˈkeɪ flɪp flɒp/ | JK 플립플롭 |
| toggle/ˈtɒɡl/ | 토글 |
| clock edge/klɒk edʒ/ | The moment when a clock signal changes from 0 to 1 or from 1 to 0. |
진리와 거짓만 아는 기계가 어떻게 산술을 수행하는지
- A processor has no adder in the sense of a thing that knows numbers. It has gates that answer true or false, and nothing else.
- Yet $1 + 1 = 10$ falls out of two gates: an XOR gives the sum digit, an AND gives the carry. That is the entire arithmetic unit in miniature, and chaining copies of it adds numbers of any width.
- The other half of a computer is remembering, and one bit of memory is also just gates, wired so that their outputs feed back into their inputs and hold.
- 이 수업에서는 하프 어더, 풀 어더 및 플립플롭을 다룹니다.
반더더기
- 하프 어더는 두 단일 비트 $A$와 $B$를 더하여 합(sum) $S$과 进位(carry) $C$를 생성합니다.
| A | B | S | C |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
- 열(read the columns)을 보십시오: $S$가 정확히 하나의 입력이 1일 때 1이 되는 것이 바로 XOR입니다. $C$가 1이 되려면 둘 다 1이어야 하므로, 이는 AND입니다. 따라서 $S = A \oplus B$와 $C = A \cdot B$가 됩니다.
- 이 회로는 어떤 전입 **进位(in)**도 무시하므로, 이는 '반(半)' 가산기라고 불리는 이유이며 단독으로 사슬 연결할 수 없습니다.

두 개의 게이트만으로 이진 덧셈이 존재합니다

The gates inside an adder
A half-adder's sum bit is an XOR gate and its carry is an AND gate — toggle A and B and watch the truth-table row light up.
In a half adder, the sum output S is produced by which gate?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
$S = A \text{ XOR } B$ (1 when the inputs differ); the carry is $A \text{ AND } B$.
In a half adder the carry output C is produced by which single gate?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
C is 1 only when both inputs are 1, which is AND. The sum S is 1 when exactly one input is 1, which is XOR.
풀 어더
- 풀 어더는 세 개의 비트를 더합니다: $A$, $B$ 및 进位-in(carry-in), 그리고 합과 进位-out(carry-out) $S = A \oplus B \oplus C_{\text{in}}$를 생성합니다.
- 두 개의 하프 어더와 OR 게이트로 구성할 수 있습니다: 첫 번째 하프 어더는 $A$와 $B$를 더하고, 두 번째는 그 합에 进位-in을 더하며, OR 게이트는 두 개의 进位를 결합합니다.
- 풀 어더를 연쇄하여 각 进位-out가 다음 进位-in에 공급되게 하면 ** ripple-carry adder(복사전위 더하기기)** 를 만들 수 있습니다: 네 개를 사용하면 두 개의 4비트 수를 더할 수 있습니다.

进位가 이동해야 하는 대상이므로 'ripple(파도)'라고 부릅니다

Match each building block to what it does.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Adders add bits (chain full adders for multi-bit addition); flip-flops store a bit (the JK fixes the SR forbidden state).
How does a full adder differ from a half adder?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
A full adder adds A, B and a carry-in (so adders can be chained) — built from two half adders plus an OR gate.
worked example: 풀 어더를 선택한 이유 (하프 어더 두 개 대신)
- 4비트 더하기기를 하프 어더가 아닌 풀 어더로 만드는 이유를 설명하십시오.
- 두 개의 4비트 수를 열별로 더할 때, 가장 오른쪽 열을 제외한 모든 열은 오른쪽 옆 열로부터의 进位를 받을 수 있으므로, 더해야 할 입력이 두 개가 아니라 세 개입니다.
- 하프 어더에는 进位-in이 없으므로 세 번째 입력을 받을 수 없으며, 进位는 단순히 사라집니다.
- Only the least significant column has no carry-in, so a half adder would do there; in practice all four are full adders, with the first carry-in tied to 0.

Why must a 4-bit adder use full adders rather than half adders?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
A half adder does produce a carry; what it lacks is a carry-in, so it cannot accept the carry arriving from the previous column.
Put the construction of a 4-bit ripple-carry adder in order.
난이도 3/5 · 200코인 + 오늘 첫 완료 시 작은 보너스 추가
Gates make a half adder, half adders make a full adder, full adders chain into a word-width adder. The carry rippling along is what gives it its name.
플립플롭
- 플립플롭은 bistable(이안정) 회로입니다: 0과 1이라는 두 가지 안정된 상태가 있으며, 현재 속해 있는 상태를 기억합니다. 정확히 한 비트를 저장합니다.
- 레지스터의 기본 요소이며, $n$개의 비트는 $n$개의 플립플롭에 해당합니다. 카운터 및 SRAMRAM 셀에서도 사용됩니다.
- 출력이 현재 입력에만 의존하는 어더와 달리, 플립플롭의 출력은 과거 입력에 의존합니다. 이것이 회로 수준에서의 기억(meaning of memory)입니다.
A flip-flop is used to:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
A flip-flop has two stable states and holds one bit — the building block of registers and SRAM.
A flip-flop is bistable — it has two stable states and remembers one bit — which makes it the building block of registers and SRAM.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Chaining flip-flops gives registers and counters; SRAM cache is built from them (no refresh needed, unlike DRAM).
SR 및 JK
- SR 플립플롭은 S(set, 설정) 및 R(reset, 초기화)라는 입력과 $Q$ 및 $\overline{Q}$라는 출력을 가지며, 두 개의 교차 연결 NOR 게이트로 구성됩니다.
S=1, R=0는 $Q$를 1로 설정합니다.S=0, R=1는 $Q$를 0으로 초기화합니다.S=0, R=0는 현재 상태를 유지(hold) 하며, 이것이 기억 기능입니다.S=1, R=1는 무효(invalid) 입니다: 동시에 설정과 초기화를 요청하기 때문입니다.- A JK flip-flop JK removes that flaw by giving the
1,1input a meaning: toggle, so the output flips to its opposite. That makes it ideal for counters, since a chain of toggling flip-flops counts in binary. - JK는 보통 clocked(클럭 인가) 됩니다: 입력이 클럭 엣지에서만 작동하여 기계 내 모든 플립플롭이 동기화되도록 합니다.

무효 입력이 유용한 입력으로 전환됨

For an SR flip-flop, which statements are correct? Select 모든 that apply.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Toggling on 1,1 is the JK's improvement. On an SR that input asks for set and reset at once and is invalid.
The JK flip-flop's toggle behaviour is what makes it suitable for building counters.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
A chain of flip-flops each toggling on its input counts in binary. Clocking them keeps every stage in step.
worked example: SR 플립플롭 추적하기
- 현재 $Q$가 0입니다. S=1 R=0, 이후 S=0 R=0, 이후 S=0 R=1의 입력 후 $Q$를 주십시오.
- S=1, R=0은 출력을 설정(set) 하므로 $Q$는 1이 됩니다.
- S=0, R=0 holds, so $Q$ stays 1. This is the step that shows it is a memory: the inputs say nothing, and the output persists.
- S=0, R=1은 초기화(reset) 하므로 $Q$는 0이 됩니다. 만약 S=1이고 R=1이 적용되었다면, 답은 값이 아니라 입력이 무효(invalid) 임입니다.

놓칠 수 있는 점
- $S = A \oplus B$와 $C = A \cdot B$: 합(sum)을 위해 XOR, 进位(carry)를 위해 AND. 순서를 바꾸면 두 점 모두 잃습니다.
- 'Half'란 '비트의 절반'이 아니라 进位-in이 없음을 의미합니다.
- 풀 어더는 두 개의 하프 어더와 OR 게이트이며, OR은 두 개의 进位를 결합합니다.
- SR 플립플롭에서
0,0는 유지(hold) 하고1,1는 무효(invalid) 입니다. JK의 개선점은1,1가 전환(toggles) 한다는 점입니다.
이해했습니다
- 하프 어더: 두 비트 입력, XOR으로부터 $S = A \oplus B$, AND로부터 $C = A \cdot B$; 进位-in 없음
- 풀 어더: 세 비트 입력, 두 개의 하프 어더와 OR로 구성; 연쇄하여 进位-out를 进位-in에 연결하여 ripple-carry adder 형성
- 플립플롭은 bistable(이안정) 이며 한 비트를 저장함; $n$개의 플립플롭이 $n$-비트 레지스터를 구성하며, 이들은 SRAM의 셀입니다
- SR: 설정, 초기화,
0,0유지,1,1무효 · JK:1,1전환(toggles), 이것이 카운터의 핵심이며, 동기화를 위해 클럭 인가됨
어떤 문제가 있었나요? 사이트 팀만 이 내용을 볼 수 있습니다.