Description
Generate independent half/full adder cells or an explicit least-significant-first ripple-carry trace with delegated bit answers.
A generated practice exercise contains a prompt and an answer key under a specific rule set. A planted answer establishes one possible solution; only an explicit enumeration or uniqueness check establishes whether alternatives exist.
Generate independent half/full adder cells or an explicit least-significant-first ripple-carry trace with delegated bit answers.
When to use this tool
Use this generator to create reproducible boolean adder circuit trace cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply mode, bitCount, initialCarry in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read bitOrder, steps, summary. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Draw Boolean input pairs and delegate half- or full-adder checks. In ripple mode feed each carry into the next bit; independent full mode draws a separate carry per cell. Return least-significant-first steps and cross-check the ripple integer total.1
Delegated operations used for this result: half adder sum carry checker; full adder majority carry checker. Their calculation or parsing conventions apply to the corresponding result fields.2, 3
| Input field | Meaning and units | Accepted input |
|---|---|---|
| mode | Mode | Required. Text; one of "half", "full", "ripple". |
| bitCount | Bit Count | Required. Safe integer; minimum 1; maximum 32. |
| initialCarry | Initial Carry | Required. Boolean. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| bitOrder | Bit Order | Required. Text; exactly "least-significant-first". |
| steps | Steps | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 32. |
| steps[].bitIndex | Bit Index | Required. Safe integer. |
| steps[].a | A | Required. Boolean. |
| steps[].b | B | Required. Boolean. |
| steps[].carryIn | Carry In | Required. Boolean. |
| steps[].sum | Sum | Required. Boolean. |
| steps[].carryOut | Carry Out | Required. Boolean. |
| summary | Summary | Required. Object; no unknown keys. |
| summary.leftValue | Left Value | Required. Safe integer. |
| summary.rightValue | Right Value | Required. Safe integer. |
| summary.sumValue | Sum Value | Required. Safe integer. |
| summary.finalCarry | Final Carry | Required. Boolean. |
| summary.rippleTotal | Ripple Total | Required. Safe integer. or Null. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"mode": "ripple",
"bitCount": 4,
"initialCarry": true,
"seed": 42
},
"output": {
"bitOrder": "least-significant-first",
"steps": [
{
"bitIndex": 0,
"a": true,
"b": false,
"carryIn": true,
"sum": false,
"carryOut": true
},
{
"bitIndex": 1,
"a": true,
"b": true,
"carryIn": true,
"sum": true,
"carryOut": true
},
{
"bitIndex": 2,
"a": false,
"b": true,
"carryIn": true,
"sum": false,
"carryOut": true
},
{
"bitIndex": 3,
"a": false,
"b": true,
"carryIn": true,
"sum": false,
"carryOut": true
}
],
"summary": {
"leftValue": 3,
"rightValue": 14,
"sumValue": 2,
"finalCarry": true,
"rippleTotal": 18
},
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- initialCarry is allowed only in ripple mode. Independent-cell sum bits are not generally the sum of two whole integers, so rippleTotal is null outside ripple mode; this does not simulate electrical timing or hardware hazards.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random Boolean Equivalence Quiz Generator
Generate complete aligned truth columns with an exact deliberate mismatch count and delegated equivalence keys under a declared valuation order.
- Random Boolean Formula to CNF Exercise Generator
Generate an exact-operator-count bounded Boolean syntax tree from supplied named variables/operators and delegate Tseitin CNF with named-variable mappings; random choices are conditional on remaining depth capacity, and auxiliary-variable CNF is equisatisfiable rather than the original-variable distributive expansion.