AGENT SKILL

logic-standard-cells-boolean-minimization-and-arithmetic

Use for combinational design: standard cells and what a library actually provides, Boolean algebra and the identities that matter in practice, minimization including Karnaugh maps and what synthesis does instead, the combinational building blocks such as multiplexers, decoders and encoders, and arithmetic circuits from ripple-carry through carry-lookahead and the adder and multiplier trade-offs.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 5
Forks
3

01 前言 Front Matter

name
logic-standard-cells-boolean-minimization-and-arithmetic
description
Use for combinational design: standard cells and what a library actually provides, Boolean algebra and the identities that matter in practice, minimization including Karnaugh maps and what synthesis does instead, the combinational building blocks such as multiplexers, decoders and encoders, and arithmetic circuits from ripple-carry through carry-lookahead and the adder and multiplier trade-offs.

03 SKILL.md 正文

Digital Logic and Firmware: Standard Cells, Boolean Algebra, Minimization, Combinational Building Blocks, and Arithmetic Circuits

Part 2 of 5 of the CMOS, Logic Gates and Firmware Engineering reference (plugin digital-logic-and-firmware-engineering), covering §9–§13. Sibling skills: logic-devices-transistors-cmos-gates-and-power (§0–§8), logic-sequential-timing-metastability-cdc-and-hdl (§14–§19), logic-firmware-boot-root-of-trust-embedded-practice-and-security (§20–§25), logic-reference (§26–§31). Section numbers are shared across the set; a reference written as §N → skill points into that sibling skill.

Currency: Boolean algebra and CMOS circuit design do not change. Two things are moving. See §26 → logic-reference for the Secure Boot certificate expiry, and open-source firmware and silicon roots of trust.

⚠️ SCOPE, because this sits between existing neighbours. ⚠️ A semiconductor reference covers device physics and fabrication; a microarchitecture reference covers how gates become processors. Neither covers the two layers here: HOW TRANSISTORS BECOME BOOLEAN LOGIC, and HOW A MACHINE GETS FROM POWER-ON TO AN OPERATING SYSTEM.

⚠️ These are the two ends of the stack where the abstractions are built, and where they most often leak.

⚠️ GOTCHA boxes mark where the textbook idealization and the real circuit diverge.

The three ideas that organize this document:

  1. ⚠️ CMOS COMPUTES BY CONNECTING, NOT BY AMPLIFYING (§5 → logic-devices-transistors-cmos-gates-and-power). A static CMOS gate is two complementary switch networks, one connecting the output to power and one to ground, never both. Once you see this, gate construction becomes mechanical and the power behaviour becomes obvious.
  2. ⚠️ TIMING IS THE REAL CONSTRAINT, NOT LOGIC (§15 → logic-sequential-timing-metastability-cdc-and-hdl, §17 → logic-sequential-timing-metastability-cdc-and-hdl). Getting the Boolean function right is the easy part. Setup and hold violations, clock skew and metastability are what actually make digital systems fail, and they fail intermittently.
  3. ⚠️ TRUST IS A CHAIN THAT STARTS BEFORE ANY SOFTWARE RUNS (§22 → logic-firmware-boot-root-of-trust-embedded-practice-and-security, §25 → logic-firmware-boot-root-of-trust-embedded-practice-and-security, §26 → logic-reference). Every security property the OS provides rests on firmware that executed first. Firmware is the most privileged and least examined code in the machine.

§9. Standard Cells

⚠️ The abstraction that makes digital design tractable: ⚠️ a library of pre-designed, pre-characterized gates with a fixed height so they tile into rows. ⚠️ What a library contains: ⚠️ combinational gates in multiple drive strengths, flip-flops and latches, buffers and clock cells, level shifters, isolation cells, fill and decap cells, and I/O cells. ⚠️ CHARACTERIZATION is the valuable part: ⚠️ timing (delay as a function of input slew and output load), power, and noise — captured in Liberty files and used by every downstream tool. ⚠️ Cell height in "tracks" trades density against speed, ⚠️ which is why a library comes in tall-cell and short-cell variants for the same process. ⚠️ The design flow uses these as atoms (see a microarchitecture reference §24) — ⚠️ synthesis maps RTL onto library cells, and place-and-route arranges them.


PART III — LOGIC DESIGN

§10. ⚠️ Boolean Algebra

⚠️ THE OPERATORS  AND, OR, NOT · ⚠️ XOR (⚠️ the workhorse of
   arithmetic and parity) · NAND, NOR
⚠️ ⚠️ FUNCTIONAL COMPLETENESS  ⚠️ NAND ALONE can express every
   Boolean function. So can NOR alone. ⚠️ This is why §5's
   natural gates are sufficient
⚠️ THE LAWS  identity, null, idempotent, complement,
   commutative, associative, distributive
   ⚠️ DE MORGAN'S  ⚠️ NOT(A AND B) = NOT A OR NOT B, and dual.
   ⚠️ The most-used identity in practice — it lets you push
   inversions around to match available gates
   ⚠️ CONSENSUS and absorption
⚠️ CANONICAL FORMS  ⚠️ sum of products (minterms) and product of
   sums (maxterms) — ⚠️ any function has exactly one of each,
   which is what makes automated minimization possible
⚠️ REPRESENTATIONS  truth table · algebraic · schematic ·
   ⚠️ BDD (binary decision diagram — ⚠️ canonical for a given
   variable order, which makes EQUIVALENCE CHECKING tractable
   and underpins formal verification)
⚠️ ⚠️ DON'T CARES ARE VALUABLE  ⚠️ input combinations that cannot
   occur, or outputs that don't matter, give the optimizer
   freedom. ⚠️ Failing to specify them costs real area

§11. Minimization

⚠️ KARNAUGH MAPS — ⚠️ a truth table rearranged in GRAY CODE order so that adjacent cells differ in one variable, making groupings visible. ⚠️ Practical to about four variables, six with effort — ⚠️ and their real value now is TEACHING the structure, not production optimization. ⚠️ Quine-McCluskey is the systematic tabular method, ⚠️ and ESPRESSO is the heuristic that real tools actually use, because exact minimization is NP-hard.

⚠️ GOTCHA — minimal gate count is not the design goal. ⚠️ Synthesis optimizes for TIMING, area and power together, against a real cell library with real delays. ⚠️ A "minimal" expression on paper may map to a slower circuit than a redundant one — and hand-minimizing before synthesis usually makes results worse, not better.

⚠️ HAZARDS are the reason redundancy is sometimes deliberately KEPT: ⚠️ a static hazard is a momentary wrong output caused by unequal path delays, and adding a redundant term can eliminate it. ⚠️ This matters in asynchronous logic and for signals feeding asynchronous inputs; in synchronous logic the flip-flop hides glitches — which is one of the main reasons synchronous design won.


§12. Combinational Building Blocks

⚠️ The standard vocabulary: ⚠️ multiplexer (⚠️ and note a mux is functionally complete — you can build any logic from muxes, which is exactly what an FPGA LUT does), demultiplexer, decoder, encoder, priority encoder, comparator, barrel shifter, parity generator. ⚠️ Tri-state buffers and buses — ⚠️ and the warning that on-chip tri-state buses have largely been replaced by multiplexers, because bus contention is a real failure and floating nodes are worse. ⚠️ ROM and PLA/PAL as ways of implementing arbitrary combinational functions by lookup rather than by gates — ⚠️ the conceptual ancestor of the FPGA. ⚠️ The design instinct worth building: ⚠️ most "complicated" combinational logic decomposes into these blocks, and expressing it that way both reads better and synthesizes better than a pile of gates.


§13. ⚠️ Arithmetic Circuits

⚠️ Where the carry chain makes latency a structural problem rather than a gate-count problem.

⚠️ HALF ADDER  sum = XOR, carry = AND
⚠️ FULL ADDER  three inputs, sum and carry out
⚠️ ⚠️ RIPPLE CARRY  ⚠️ simple, and delay grows LINEARLY with width
   because each stage waits for the previous carry. ⚠️ This is
   the fundamental problem of binary addition
⚠️ THE FASTER ADDERS, all attacking the carry
   ⚠️ CARRY LOOKAHEAD  ⚠️ compute GENERATE and PROPAGATE terms in
      parallel, so carries don't ripple. ⚠️ Logarithmic delay,
      more area
   ⚠️ CARRY SELECT  compute both possible results, choose when
      the carry arrives
   ⚠️ CARRY SKIP · ⚠️ PARALLEL PREFIX (Kogge-Stone, Brent-Kung —
      the family real high-speed adders come from, trading
      wiring against depth)
⚠️ ⚠️ TWO'S COMPLEMENT  ⚠️ negation is invert-and-add-one, and
   ⚠️ THE SAME ADDER HANDLES SIGNED AND UNSIGNED. ⚠️ This is why
   two's complement won over sign-magnitude — the hardware is
   identical
   ⚠️ OVERFLOW DETECTION differs between signed and unsigned,
   which is a classic source of bugs
⚠️ MULTIPLICATION  ⚠️ partial products → ⚠️ WALLACE or DADDA tree
   reduction using CARRY-SAVE adders (⚠️ which defer carry
   propagation entirely until the final add) → one fast adder
   ⚠️ BOOTH ENCODING reduces the number of partial products
⚠️ DIVISION  ⚠️ genuinely hard, iterative, and much slower —
   restoring, non-restoring, SRT (⚠️ and the Pentium FDIV bug
   was an SRT lookup table error, which is why this is a famous
   example of verification failure)
⚠️ FLOATING POINT  ⚠️ align, operate, normalize, round — with
   ⚠️ ROUNDING and denormal handling as the parts that are
   subtly wrong in naive implementations

04 同仓库更多 Skills

the-vibey-project
the-vibey-project/vibey

white-paper-writing

Use when writing white papers, technical reports, policy documents, thought leadership pieces, or any long-form authoritative document. Triggers on requests to write, structure, outline, or review white papers, technical reports, position papers, policy briefs, or evidence-driven arguments. Also use for B2B content marketing strategy, technical documentation requiring authority, academic-style reports, or any document that must educate while persuading. Use when someone asks "how should I structure this" for a long-form document.

★ 5
the-vibey-project
the-vibey-project/vibey

prose-technical-mechanics

Use when editing or writing prose at a technical/mechanical level: choosing between Anglo-Saxon and Latinate diction, placing information in topic vs stress positions, writing periodic vs cumulative sentences, handling sentence rhythm, punctuation as logic, transitions, paragraph structure, or phonesthetics. Use when someone wants to understand WHY prose works or doesn't, not just surface-level style advice. Triggers on word choice, sentence structure, emphasis, rhythm, diction, or any deep writing mechanics question.

★ 5
the-vibey-project
the-vibey-project/vibey

prose-mechanics

Use when writing, editing, or analyzing prose style; when trying to avoid generic AI-sounding writing; when applying specific prose styles such as journalistic, academic, narrative, KJV biblical, Hemingway plain, Latinate/Jamesian, Orwellian, Augustan, Victorian, Early Modern (Bacon, Browne, Milton), or free indirect discourse; or when coaching someone on writing voice and mechanics. Triggers on any request to improve, analyze, or write in a specific prose style, to fix "AI-sounding" writing, to make prose more vivid or concrete, to vary sentence rhythm, or to understand how a particular writer achieves their effects.

★ 5
the-vibey-project
the-vibey-project/vibey

narrative-structure

Use when structuring stories, pitches, presentations, white papers, or any persuasive narrative; analyzing the hero's journey in fiction or non-fiction; applying StoryBrand for business communication; designing narrative arcs for thought leadership; or understanding Vogler, Snyder, Propp, or Campbell frameworks. Triggers on any narrative structure, storytelling, pitch structure, StoryBrand, hero's journey, three-act structure, Freytag, Save the Cat, narrative arc, or "how should I structure this story/pitch/presentation" request.

★ 5
the-vibey-project
the-vibey-project/vibey

legal-brief-writing

Use when writing legal briefs, motions, or any court filing; when analyzing judicial cognition and persuasion; when applying elite brief-writing techniques from Roberts, Clement, Kagan, Garner; or when structuring legal arguments for maximum persuasion. Also use for autistic/neurodivergent advocates who need to understand how their natural communication style maps to elite legal advocacy. Triggers on any legal writing, brief drafting, motion preparation, or legal argument structuring request.

★ 5
the-vibey-project
the-vibey-project/vibey

journal-publishability-criteria

Use whenever a research paper, article or preprint is being written, revised, reviewed or published, and specifically before every publication of docs/paper.md. Covers what legitimate journals actually gate on, in order of gating — the editor's desk screen (scope, novelty, package problems), what reviewers judge (methodological soundness, claims the evidence can carry, statistical and qualitative reporting), EQUATOR reporting guidelines, the ICMJE authorship criteria, COPE's view of text recycling, the near-universal generative-AI policy (no AI author, disclosure, author responsibility), TOP 2025 transparency standards, how to verify a journal is legitimate, submitting without an institution, and a pre-submission checklist. Triggers on requests to evaluate, review, prepare or submit a paper, to judge publishability, to write a declarations or data-availability section, to disclose AI use, or to check a journal.

★ 5