Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Windows Tipps & SecurityNighthawk M7 Pro im Test: Flexibler, aber teurer 5G-Router(21.09.2026 um 10:30 Uhr)
Sichere ProgrammierungNeue Gmail-Funktion: So sparst du jetzt Zeit bei Einmalcodes(21.09.2026 um 10:00 Uhr)
Sichere ProgrammierungYour GIF exporter is fine — the container is the problem(21.09.2026 um 10:01 Uhr)
Sichere ProgrammierungCSS, Motion, or GSAP? I Choose by Who Owns the Animation(21.09.2026 um 10:12 Uhr)
Windows Tipps & SecurityNighthawk M7 Pro im Test: Flexibler, aber teurer 5G-Router(21.09.2026 um 10:30 Uhr)
Sichere ProgrammierungNeue Gmail-Funktion: So sparst du jetzt Zeit bei Einmalcodes(21.09.2026 um 10:00 Uhr)
Sichere ProgrammierungYour GIF exporter is fine — the container is the problem(21.09.2026 um 10:01 Uhr)
Sichere ProgrammierungCSS, Motion, or GSAP? I Choose by Who Owns the Animation(21.09.2026 um 10:12 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

My Nand2Tetris Journey #1 - Building Logic Gates from NAND

What I Built Logic gates: NOT, AND, OR, XOR, MUX, DMUX, NOT16, AND16, OR16, MUX16, OR8WAY, MUX4WAY16, MUX8WAY16, DMUX4WAY, DMUX8WAY with HDL. How I Solved Derive boolean formulas with truth tables and SOP(Sum of…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




What I Built




  • Logic gates: NOT, AND, OR, XOR, MUX, DMUX, NOT16, AND16, OR16, MUX16, OR8WAY, MUX4WAY16, MUX8WAY16, DMUX4WAY, DMUX8WAY with HDL.






How I Solved




  • Derive boolean formulas with truth tables and SOP(Sum of Products).

  • Apply double negative and De Morgan's law to make it simple to use NAND.

  • Use already-built logic gates to build another logic gates(Mux16, Mux8way16, etc.)






Example : XOR Gate

































A B OUT
0 0 0
0 1 1
1 0 1
1 1 0


From the truth table, the output is 1 for (A, B) = (0, 1) and (1, 0).

Hence, the Sum of Products (SOP) expression is:

A XOR B = A̅B + AB̅

= ¬¬(A̅B + AB̅)

= ¬(¬(A̅B) · ¬(AB̅))

= NAND(NAND(A̅, B), NAND(A, B̅))






What I learned




  • The overall process of building other logic gates from NAND gates.

  • What mux and dmux are and how to build multi-input logic gates.

  • Why NAND is amazing






Reflection



Since this chapter was just a repetition of a simple process - Derive a boolean formula using SOP, apply De Morgan's law to use NAND, and connect already-built logic gates - It was not as hard as I expected. (But it was pretty hard when I was building Mux4way16, Dmux4way, etc, since I was not familiar with them at all)



And it was really fascinating experience building logic gates one by one only using NAND. Once I realized that NAND(a, a) == NOT(a), it felt like a chain reaction, because ideas for other logic gates started to follow naturally. For example, AND can be built by applying NAND first and then negating its output with another NAND. Once you can build AND, you can also build OR gate since you can use De Morgan's law and double negative. How amazing!



But in next chapter, I'm going to build HalfAdder, FullAdder, Add16, Inc16 and ALU that looks way harder than chapter 1(I already read a PDF file about next chapter already). Still, I think I can handle it since next chapter will also be about connecting logic gates properly.



So far, so good!

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94030 | A security vulnerability has been detected in SerenityOS up to 3d83e4509…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick