Home

CS with Seongyeol

For aspiring CS students and non-majors
An interactive computer science series

Gray Tree by Piet Mondrian
Apple Tree by Piet Mondrian

- subscribers

Curriculum

4 parts, 30+ posts planned

Part 1 — Building a Computer from 0s and 1s

01

Why Computers Only Have Two Fingers

Binary, analog and digital

02

When Electricity Learned Logic

Boolean algebra, truth tables, Claude Shannon

03

Computers Are Made of 'Do You Like Mom or Dad?'

AND, OR, NOT gates, completeness

04

Actually, the Computer Didn't Like Both Mom and Dad

NAND gate, functional completeness

05

Where Do You Want to Go, Data?

multiplexer, decoder

06

A Calculator Made of Switches

half adder, carry

07

What the Front Digit Passes to the Back

full adder, ripple carry adder

08

Curing the Computer's Amnesia

Combinational vs sequential logic, SR latch, D latch

09

Teaching a Computer Rhythm

clock, D flip-flop, edge trigger

10

If It Only Calculates, It's a Calculator, Not a Computer

Turing machine, universal Turing machine, computability

11

Ask Von Neumann How to Assemble a Computer

Stored-program concept, machine code, memory, I/O devices

12

Talking to the CPU

registers, ALU, Zero Flag, instruction set

13

Fetch, Decode, Execute

Fetch-Decode-Execute cycle, control unit

14

Fast at Computing, Slow at Remembering

cache, cache hit, cache miss, locality, memory hierarchy

Part 2 — Thinking Like a Computer

01

할 일을 쪼개면 그게 알고리즘

자료구조, 알고리즘

02 Next post coming soon
Part 3 — No Computer Runs Just One Program Coming soon
Part 4 — How Computers Talk to Each Other Coming soon

Interactive Demos

01. Why Computers Only Have Two Fingers

Pixelated image
64x32
Read →

01. Why Computers Only Have Two Fingers

Binary (2 levels)Errors 0/24
Decimal (10 levels)Errors 6/24

The received signal is read as the nearest level. Green = correct read, Red = error.

Noise±20%
Read →

02. When Electricity Learned Logic

A AND B
000
010
100
111
Read →

04. Actually, the Computer Didn't Like Both Mom and Dad

Read →

07. What the Front Digit Passes to the Back

1+
100

1의 자리 반가산기

HALFADDERABSumCarry

2의 자리 전가산기

FULLADDERABCinSumCout
Read →

09. Teaching a Computer Rhythm

A
-
B
-
C
-
Read →

09. Teaching a Computer Rhythm

A
-
B
-
C
-
Read →

10. If It Only Calculates, It's a Calculator, Not a Computer

현재 상태읽은 기호다음 상태쓸 기호이동

초기 상태: q0 / 정지 상태: q_halt / 빈 칸: _ / 실행 전 테이프 클릭으로 값 수정 가능

Read →

11. Ask Von Neumann How to Assemble a Computer

화면 (10×10)

VRAM

0: 흰색, 1: 검은색

Read →

12. Talking to the CPU

Memory
Registers
R00
R10
R20
R30
Read →

12. Talking to the CPU

Registers
R05
R13
R20
R30
Rd
Rs
Result
Z Flag0
Read →

12. Talking to the CPU

MOVE Rd, Rs

Copies the value of Rs to Rd.

00004bit
Rd2bit
Rs2bit
MOVE R1, R200000110
Read →

13. Fetch, Decode, Execute

AddrBinaryAssembly
001100001LDI R0, 1
101100110LDI R1, 2
200010001ADD R0, R1
310010101STORE 5
411000010JUMP 2
500000000Data
PC0
Read →

13. Fetch, Decode, Execute

0110
Rd
Imm
LDI R0, 3

Loads an immediate value into Rd.

RegisterImm → Rd
MemoryNot used
ALUNot used
Read →

14. Fast at Computing, Slow at Remembering

Memory address
0
1
2
3
4
5
6
7
Read →

14. Fast at Computing, Slow at Remembering

Memory address
Cache
····
RAMAll addresses
Read →

14. Fast at Computing, Slow at Remembering

·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
HitMiss
Hit rate -%
Read →

14. Fast at Computing, Slow at Remembering

Memory address
L1
··
~4 cycles
L2
····
~10 cycles
L3
········
~40 cycles
RAM
All addresses
~200 cycles
Read →

15. 할 일을 쪼개면 그게 알고리즘

14327821
  1. Find the smallest value in the unsorted part.
  2. Swap it with the first value of the unsorted part.
  3. The sorted part grows by one.
  4. If one value remains, stop. Otherwise, go back to 1.
Read →

15. 할 일을 쪼개면 그게 알고리즘

Target: 123
35812141719232628313537404246495154586163667073757882858790949699103106108111115118120123127130132135139141144148
Read →

15. 할 일을 쪼개면 그게 알고리즘

Target: 123
35812141719232628313537404246495154586163667073757882858790949699103106108111115118120123127130132135139141144148
Read →