<style>
.reveal {
font-size: 32px;
}
</style>
# 邏輯紅石
`### & HyperSoWeak`

---
## Minecraft, M3?

----
## Redstone is quite simple, right?

---
## Circuit Component Introduction
----
### Redstone torch
 
----
### Redstone dust = Wire

----
### Redstone repeater = Buffer + Delay


----
### Redstone repeater (Lock Mode)

----
### Redstone Comparator


----
### Redstone Comparator (Comparison Mode)

$output = rear \times [(left \leq rear) \land (right \leq rear)]$
----
### Redstone Comparator (Subtraction Mode)

$output = max(rear − max(left, right), 0)$
----
### Redstone lamp
 
---
## Fundamental Circuit Gate Introduction
----
### AND Gate

----
### OR Gate

----
### !Gate

----
### Fun fact: NOT gate is a gate,
### but Bill Gates is NOT a gate
 

----
### XOR Gate

----
### More Gates!

  
We will not talk about this QwQ<!-- .element: class="fragment" data-fragment-index="1" -->
---
## What elements does a redstone calculator have?
- Keyboard (Input)
$\xrightarrow{}$ Encoder
$\xrightarrow{}$ BCD
$\xrightarrow{}$ Binary
$\xrightarrow{}$ Memory
$\xrightarrow{}$ Calculate
$\xrightarrow{}$ Memory
$\xrightarrow{}$ Binary
$\xrightarrow{}$ BCD
$\xrightarrow{}$ Decoder
$\xrightarrow{}$ 7 Segment Display (Output)
<!-- .element: class="fragment" data-fragment-index="1" -->
---
## Encoder / Decoder

(3 to 8 decoder)
----
## Encoder / Decoder

---
## Memory

----
## Read Only Memory (ROM)
easy
----
## Random Access Memory (RAM)
- Read
- Write
- Clear
----
## Latch


---
## Let's Do Some Arithmetic!
---
## Digital Signal Adder
----
### Half Adder

----
### Full Adder
 
- $S = A \oplus B \oplus C_{in}$
- $C_{out} = AB + BC_{in} + AC_{in}$
----
### RCA (Ripple-Carry Adder)

----
### CLA (Carry-Lookahead Adder)
Faster!

----
### CCA (Carry-Cancel Adder)
Fasterererer!

----
## BCD to Binary

---
## Dreamy Subtractor Addiction
Use 2's complement, yay
---
## Neat Multiplier Spatial Layout
---
## Divider's Secret Algorithm
---
## Binary to BCD
Double Dabble Algorithm
---
## Yay 下課
---
{"slideOptions":"{\"transition\":\"slide\"}","title":"Redstone - slide","contributors":"[{\"id\":\"023479a5-db5b-4251-8691-69550cf1f264\",\"add\":3877,\"del\":1320},{\"id\":\"ca3776a5-cc5c-46ed-85a2-38e3e36ca2e7\",\"add\":2296,\"del\":575}]","description":"### & HyperSoWeakimage"}