Count Zero Bits
Count the 0 bits in each pasted binary value and the total across the list.
What this page computes
Paste binary values one per line and the page counts the positions holding a 0 in each value, then sums the counts. It is the complement of the one-bit count over the width you pasted.
Where it stops
The width is the characters on the line, so 0001 reports three zeros. A line with a character other than 0 or 1 is refused by line number, and a box with no lines is refused rather than reported as zero zeros.
Why the answer repeats
The count is a loop over the pasted text in this tab. Nothing is fetched, nothing is written to storage, and the same input prints the same total after a reload.
Zero-bit count per pasted binary line, plus the total, measured over the printed width so leading zeros are counted. A line with anything but 0 and 1 is refused by line number.
How to use it
Paste one binary value per line and press Run. Each line reports its zero count and the final line sums them.
The arithmetic
Because the width is what you pasted, 0001 has three zeros and 1 has none: the page counts characters, not the two's-complement width of a machine word.
What to Expect
Best for
- counting padding zeros
- comparing a value with its masked form
What this tool keeps
- the per-line zero count and the total
Sample input
0001 / 1111 (one per line)
Sample output
0001 has 3 zero bit(s) 1111 has 0 zero bit(s) Total = 3 zero bits across 2 value(s)
Frequently asked questions
How do I use the count zero bits page?
Paste binary values one per line, then press Run. Each line gets its own count and the final line is the total.
Is anything uploaded?
No. The whole calculation runs in this tab with JavaScript: no request is made, no account is needed, nothing is stored, and the page keeps working offline once it has loaded.
What are its limits or bounds?
Every line must contain only 0 and 1 and the box must not be empty. Zeros are counted over the printed width, so 0001 has three of them.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.