Menu

Theme

Tools · Tool · CHECKED ON 5.0.0

Build and check Logisim test vector files

A Logisim test vector is a text file: the first line lists the circuit's input and output pin labels (with widths such as A[4]), and each following line gives input values and the expected outputs. Load it in Logisim-evolution with Simulate, Test Vector…, or run it on the command line with -w. Build or check your file below; read your pin names straight from your .circ so the header matches exactly.
FOR
Students with a test vector to write or fix, and teachers building vectors for a grader · Logisim-evolution 5.0.0
CHECKED
12 Nov 2026

Test vector builder and checker

Pins of the circuit under test
Name (exact label)BitsDirectionNumber formatRemove
Test type

Type values in any form Logisim accepts, or plain decimal numbers: the builder writes them in each column's number format. Use <DC> for an output you do not care about and x digits only in outputs.

Fill expected outputs from expressions
ABCinSCout
Header: 5 pin columns. 8 rows. 0 errors, 0 warnings. Logisim will load this file.
# Made with the logisim.dev test vector builder
A B Cin S    Cout
0 0 0   <DC> <DC>
0 0 1   <DC> <DC>
0 1 0   <DC> <DC>
0 1 1   <DC> <DC>
1 0 0   <DC> <DC>
1 0 1   <DC> <DC>
1 1 0   <DC> <DC>
1 1 1   <DC> <DC>

The file format, line by line

Our passing vector for a full adder:

File full-adder.txtvector
# full adder, all 8 rows (logisim.dev lab)
A B Cin S Cout
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1

Everything below was measured on 5.0.0 (F107). Where the upstream guide and our measurement differ, we follow the measurement.

Values in a 4-bit column
0101Binary, because it has exactly as many characters as the column is wide
01_01Binary: underscores are ignored before counting
0x5, 0xF, 0x00FHex, checked by value, so leading zeros are fine
0x1FRejected: too many bits (the value needs 5)
0b101, 0o7Binary and octal with a prefix
7, -8Signed decimal: a 4-bit column takes -8 to 7
15, 8, 101Rejected: decimal is signed, and 101 is not binary because it has 3 characters, not 4
1x01, 0xx5, xxxxBinary, hex and binary with don't-care bits
x aloneRejected in a 4-bit column; accepted in a 1-bit column
0X5, 0B101, +3Rejected: prefixes are lower case, and there is no plus sign
<DC>, <float>Don't care and floating, in any letter case

Header rules: a bus is Name[width] with width 1 to 64 and no space before the bracket. A row may have tabs or several spaces between values, a comment after the values, blank lines between rows, and CRLF line endings. A byte-order mark at the start of the file is not removed, so the first column then matches no pin.

Sequential circuits: set and seq

Add <set> and <seq> columns, in any position. Rows with the same set number run in seq order and keep their state; the first step of a set starts from a reset. Set 0 means “no sequence” and needs seq 0; a step in any other set needs a seq number from 1; set numbers cannot go down and seq numbers must increase within a set. A row may leave out trailing set and seq values. Our counter example:

File counter-seq.txt (first rows)vector
CLK Q[4] <set> <seq>
0 0x0 1 1
1 0x1 1 2
0 0x1 1 3
1 0x2 1 4
0 0x2 1 5
1 0x3 1 6

A Clock component can be named <clk> in the header when it has no label, or left out of the file (then each step moves it half a cycle). The upstream guide’s own example puts seq 1 in set 0, which 5.0.0 rejects with <Set> is 0 but <Seq> is 1, not 0 (F38). Full guide: test vectors.

Run it in Logisim

  1. Open the circuit

    The test uses the circuit that is current, so select the circuit your header was written for.

    Check: The circuit is current in the project window.

  2. Simulate, Test Vector…

    It starts empty with “Passed: 0 Failed: 0”.

    Check: A window with Load Vector, Run, Stop, Reset and Close Window.

  3. Load Vector

    Pick your file. Logisim runs the rows as soon as it loads, lists a failing row first and shades the wrong output cell red.

    Check: The counts appear at once.

LAB lab-lnx · Linux lab5.0.02026-11-12

The Test Vector window with the header Passed: 7 Failed: 1. The first row says fail and its S cell is shaded red with the value 1 while Cin, A, B are all 1; the other seven rows say pass.

The same window with our failing vector: the failing row is listed first and the wrong output cell is red. Linux lab, Logisim-evolution 5.0.0.lab-lnx-le500-test-vectors-02
Test Vector window with Passed: 7 Failed: 1; the failing first row has its S cell shaded red.

We did not press the Show and Set buttons or hover over a red cell. The guide inside the jar describes them; see test vectors.

Run it from the command line

Terminal
java -jar logisim-evolution-5.0.0-all.jar --no-splash -w main vectors/full-adder-pass.txt full-adder.circ
Output: Loading test vector “vectors/full-adder-pass.txt”…
Output: Running 8 vectors…
Output: 1 2 3 4 5 6 7 8
Output: Passed: 8, Failed: 0
exit: 0
Terminal
java -jar logisim-evolution-5.0.0-all.jar --no-splash -w main vectors/full-adder-fail.txt full-adder.circ
Output: Loading test vector “vectors/full-adder-fail.txt”…
Output: Running 8 vectors…
Output: 1 2 3 4 5 6 7 8
Output: Error on test vector 8:
Output:   S = 1 (expected 0)
Output: 
Output: Passed: 7, Failed: 1
exit: 0

For all options see command line; for grading a class see test vectors and teachers.

Error messages and how to fix them

Each message below was printed by 5.0.0 for a file in our batteries (F107). The window shows the same text.

Messages from the loader
Column a has no matching pinThe header name is not a pin label. Labels are case-sensitive; read the pins from your .circ.
Column A has width 3 but pin has width 4Write the width: A[4]. A clock column must be 1 bit.
Test Vector header format error: bad spec: A[4]xThe column is not Name or Name[width]. Remove spaces before the bracket and anything after it.
Test Vector header format error: bad width: A[65]The width must be a whole number from 1 to 64.
Test Vector data format error: too many values / not enough valuesThe row has a different number of values than the header has columns.
Test Vector data format error: Too many bits in "15" expected 4 bits did you mean A[5]??Decimal is signed. Write 0xF or four binary digits.
Test Vector data format error: Unexpected character 'X' in "0X5"Prefixes and x digits are lower case.
Test Vector data format error: expected digitsA 0x, 0o or 0b prefix with nothing after it.
<Set> is 0 but <Seq> is 1, not 0Use set 1 for a sequence.
TestVector format error: empty fileOnly comments or blank lines. Add the header.
Error on test vector 8:Not a format error: row 8 ran and an output was wrong.

Worked examples

Each vector below passed in Logisim with its circuit (F17, F104):

Vector won’t load

Check these in order0 / 6 done

Limits

The tool checks syntax and pin names. It does not simulate your circuit, so it cannot tell you whether the expected outputs are right: it can fill them from expressions for 1-bit pins, and the truth-table tool makes expected outputs from a table. Pins are read from the circuit you choose, not from subcircuits. Classic Logisim 2.7.1 has no test vectors. We did not test the grid editor on a phone keyboard or with a screen reader beyond automated checks.

Privacy

Files are read in your browser and are not sent anywhere. Reloading the page forgets them.

Sources

  1. Test-vector parsing batteries: 161 files run on Logisim-evolution 5.0.0, logisim.dev lab data: test-data/lab17-2026-11-12-test-vectors/datasets/tv-battery.json, tv-battery2.json (F107)
  2. Test vector guide inside the Logisim-evolution 5.0.0 jar, Logisim-evolution project, logisim.dev lab data: doc/en/html/guide/test_vector/ in logisim-evolution-5.0.0-all.jar, accessed 11 Nov 2026
  3. Exit codes and display requirement, logisim.dev lab data: test-data/FINDINGS.md F17, F18, F102

Try: , , ,