Registers, counters and memory
도입됨
8:05
디지털 논리 설계
Digital logic needs only two voltage levels, a handful of gates, and time. A three-input function has just eight rows, so checking every row is free, on paper…
영어 내레이션 · 영어와 중국어 자막 전환 가능
이 수업의 내용
| English | 의미 |
|---|---|
| register/ˈredʒɪstə/ | 레지스터 |
| shift register/ʃɪft ˈredʒɪstə/ | 시프트 레지스터 |
| memory/ˈmeməri/ | 메모리 |
| clock/klɒk/ | A regular square-wave signal that tells a digital circuit when to update. |
| synchronous counter/ˈsɪŋkrənəs ˈkaʊntə/ | 동기 카운터 |
| ripple counter/ˈrɪpl ˈkaʊntə/ | 비동기 카운터 |
| address lines/əˈdres laɪnz/ | 주소선 |
7, 이후 8
- 스코어보드는 7에서 8로 변경되면서 나머지 모든 숫자는 그대로 둡니다. 이는 레지스터 업데이트이며, 카운팅은 스스로 업데이트하는 레지스터입니다.
- 이 수업은 컴퓨터의 저장 블록을 구축합니다: 레지스터, 시프트 레지스터, 카운터 및 메모리.
레지스터는 n 비트를 동시에 로드합니다
- 레지스터는 하나의 클럭을 공유하는 D 플립플롭 행입니다. 각 엣지에서 모든 $n$ 비트가 동시에 로드되며, 엣지 사이에는 유지됩니다.
- 로드Enable 입력은 각 엣지마다 새로운 데이터를 취할지 기존 데이터를 유지할지를 결정합니다. 이것이 한 숫자만 변경되고 나머지는 고정되는 방법입니다.
In a register with load-enable low, the stored bits follow the data inputs at each clock edge.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
With load-enable low each flip-flop is fed its own output, so it keeps its value. Only an enabled edge loads new data.
시프트 레지스터는 비트를 이동시킵니다
- 시프트 레지스터에서 각 플립플롭의 출력은 다음 플립플롭의 입력에 연결되므로, 스토어된 비트가 클럭당 한 자리씩 이동합니다.
- 직렬 입력, 병렬 출력은 비트 스트림을 Wort로 변환하며, 병렬 입력, 직렬 출력은 그 반대를 수행합니다. 입력 1, 1, 0, 1로 오른쪽으로 시프트하면 1000, 1100, 0110, 1011을 얻습니다.
One clock edge moves every stored bit
$Q^{+}=\{sin,Q_3,Q_2,Q_1\}$
Starting from 0000, clock the lesson’s right-shift input stream 1, 1, 0, 1 to get 1000, 1100, 0110, 1011. Follow each old bit to its new position, and distinguish selecting the next input from clocking it into storage.
A 4-bit right-shift register starts at 0000. Inputs 1, 0, 0, 1 enter at the left over four clocks. What does it hold?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Trace: 1000, 0100, 0010, 1001. The first bit in has moved furthest right.
리플 및 동기화 카운터
- 리플 카운터는 톰글 플립플롭을 연접합니다: 각 출력이 다음을 클럭합니다. 간단하지만 각 단계마다 지연 시간이 추가되어 상단 비트가 늦게 안정화됩니다.
- 동기식 카운터는 모든 플립플롭을 동일한 엣지에서 클럭하며, 논리를 통해 어떤 비트가 톰글해야 할지를 계산합니다. 모든 비트가 동시에 변경됩니다.


In a synchronous counter all the flip-flops receive the same clock edge.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
That is the definition. Logic decides which bits toggle, so all bits change together and no delay accumulates, unlike a ripple counter.
worked example: 3-비트 업카운터
- Bit 0 toggles every clock; bit 1 when $Q_{0} = 1$; bit 2 when $Q_{1} Q_{0} = 11$. A bit toggles when every bit below it is 1, which is how adding 1 carries.
- 초기화 후 카운터는 000, 001, …, 111를 세고 다시 000로 돌아옵니다: 총 $2^{3} = 8$개의 상태입니다.
In a 3-bit synchronous up-counter, bit 2 toggles when —
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Bit k toggles when all lower bits are 1, which is when they roll over. The count 000 … 111 with $2^{3} = 8$ states is the check.
worked example: mod-6 카운터
- 동기식 mod-6 카운터는 000에서 101까지 작동합니다; 101 이후 다음 클럭 엣지에서 000이 쓰여집니다. 코드 110과 111은 정상 카운팅 시 사용되지 않습니다.
- 현재 단어가 101, 110 또는 111일 때 다음 상태를 000으로 선택하고, 그렇지 않으면 1을 더합니다. 또한 다음 엣지에서 사용되지 않는 어떤 코드에서도 복원됩니다. $Q_{2} \cdot Q_{1}$은 110과 111을 감지하지만, 101에서 0이므로 해당 조건만으로는 이 동기식 카운터를 만들 수 없습니다.
Predict the toggles, then clock the new count
$Q^{+}=Q\oplus T$
Trace the 3-bit counter’s eight states and see why each bit toggles when all lower old bits are 1. Compare synchronous mod-6, where 101 goes directly to 000. Load either unused code 110 or 111 and check recovery at the next clock edge.
A synchronous mod-6 counter writes 000 at the clock edge after 101, and must also recover from the unused codes. Which present states should load 000?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
The edge after 101 must give 000, so 101 is in the set; adding the unused 110 and 111 makes the counter recover from them too. $Q_{2} \cdot Q_{1}$ is 0 at 101, so the count would step on to 110. $Q_{2}$ alone would also clear 100.
A mod-10 counter is built from binary flip-flops. How many of its codes are unused?
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Ten states need 4 flip-flops ($2^{4} = 16$), leaving $16 - 10 = 6$ unused codes: 1010 to 1111.
메모리: 단어와 주소 라인
- 메모리는 단어들의 배열입니다. $k$개의 주소 라인으로 $2^{k}$개 단어 중 하나를 선택하며, 각 단어는 $m$비트 너비입니다.
- 8K × 8 메모리는 $8192 = 2^{13}$개의 8비트 단어를 포함하며, 13개의 주소 라인과 8개의 데이터 라인을 가집니다.
An 8K × 8 memory needs how many address lines?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
$k$ address bits select one of $2^{k}$ words: $8192 = 2^{13}$, so 13 lines. The 8 is the word width (data lines), not the address.
세 가지 일반적인 실수
- 속도를 고려한 리플 카운터 신뢰성. 느린 속도에서는 정상처럼 보이지만 지정된 클럭에서는 실패합니다. 이는 지연 시간이 누적되기 때문입니다.
- 사용하지 않는 상태 무시. mod-N 카운터는 전원 인가 또는 노이즈 발생 시 비합법 코드로부터 복귀할 수 있어야 합니다.
- 주소와 데이터 너비의 혼동. 8K × 8에서 8K는 주소 라인을 설정하고, 8은 단어 크기입니다.
복습
- 레지스터는 공유된 엣지에서 로드되고, 시프트 레지스터는 클럭마다 비트를 한 자리씩 이동시킵니다.
- 동기식 카운터는 모든 하위 비트가 1일 때 한 비트를 톰글하며, mod-N 카운터는 사용되지 않은 코드를 처리해야 합니다.
- $k$개의 주소 라인은 $2^{k}$개의 단어를 선택합니다.
어떤 문제가 있었나요? 사이트 팀만 이 내용을 볼 수 있습니다.