Version 1.0.0
A single-file, zero-dependency engineering utility — number conversion, bit manipulation, frequency/time, dB ↔ linear, rise-time ↔ bandwidth, Ohm's law, and IEEE 754 visualization. Open index.html directly in any modern browser — no build step, no server required.
Runs entirely in your browser, installable as a PWA, works offline.
| # | Tab | What it does |
|---|---|---|
| 1 | Number | Expression evaluator + 64-bit binary grid + bit fields |
| 2 | Memory | Data-size converter — bytes ↔ KB/MB/GB/TB (binary & decimal) |
| 3 | Freq ↔ Time | Frequency ↔ period two-way conversion with clock presets |
| 4 | dB | Power (×10) and Voltage (×20) dB ↔ linear conversion |
| 5 | Rise / BW | Rise time ↔ bandwidth using Gaussian and single-pole models |
| 6 | Ohm | Solve any 2 of V, I, R, P for the other two |
| 7 | IEEE 754 | Float32 / Double64 bit-level visualizer with field decoding |
- Auto-detect input — decimal
255, hex0xFF, binary0b1010, octal0o17all parsed automatically - Real-time evaluation — result updates 200 ms after you stop typing; press Enter to commit + show errors
- Four output formats — HEX · DEC · OCT · i64 (signed two's complement), each with a ⎘ copy button
- 64-bit binary grid — 4 rows × 16 bits, MSB → LSB, grouped by nibble and byte
- Click any bit to toggle it — the expression input and all outputs update instantly
- Pop count badge — shows how many bits are set
- Byte breakdown —
B7→B0strip showing each byte as0xNN - Endian toggle —
BE/LEbutton reverses the byte strip order - Named bit fields — click
Fieldsto open the field-map editor; define fields like31:16 ADDRand see them colored in the grid plus a decoded field-value table - Expression history — ↑ / ↓ arrow keys cycle through your last 20 expressions (persisted across reloads)
- Scroll hint — gradient fade on the right edge when the grid overflows on narrow screens
| Category | Operators / Functions |
|---|---|
| Arithmetic | + - * / % ** |
| Bitwise | & | ^ ~ << >> |
| Functions | lsr(v, n) rol(v, n) ror(v, n) |
| Literals | 255 (dec) · 0xFF (hex) · 0b1010 (bin) · 0o17 (oct) |
lsr(v, n)— logical (unsigned) right shift; masksvto 64 bits firstrol(v, n)— rotate left 64-bitror(v, n)— rotate right 64-bit~— bitwise NOT, correctly 64-bit masked:~0→0xFFFFFFFFFFFFFFFF- All results auto-masked to 64-bit unsigned
255
0xFF
0b11001010
0o755
0xFF & 0x0F
(0x10 + 4) << 2
~0xDEAD
5 % 3
2 ** 10
0xAB ^ 0xFF
lsr(~0, 4)
rol(1, 4)
ror(0x8000000000000000, 1)
Click Fields, then in the textarea enter:
31:16 ADDR
15:8 FLAGS
7:4 MODE
3:0 STATUS
The corresponding bits in the grid are colored per field, and a decoded table shows each field's hex and decimal value.
- Auto-detect input — enter a value in decimal (
4096,1.5) or hex (0x100000), interpreted in the unit you pick - Mode toggle — Binary (1024) for
KiB/MiB/GiB/TiB/PiB, or Decimal (1000) forKB/MB/GB/TB/PB - Exact byte count — output line shows the total in comma-grouped decimal and hex
- All units at once — grid shows the value across every unit in the current mode; click any cell to copy
- Switching modes keeps the same magnitude position (e.g.
GiB↔GB)
Binary units: B KiB MiB GiB TiB PiB
Decimal units: B KB MB GB TB PB
- Two-way live conversion between frequency and period
- Both sides show the value in all units simultaneously
- Clock presets — quick buttons for common values:
24M33M48M100M125M200M1G2.4G5G - Click any unit cell to copy its value (green flash confirms copy)
- Derived values row — shows
½ periodand¼ periodfor the current frequency
Frequency units: THz GHz MHz kHz Hz mHz
Period units: s ms µs ns ps fs
- Mode toggle — Power (×10·log₁₀) or Voltage (×20·log₁₀)
- Two-way live conversion: type dB → linear updates, or vice versa
- Linear value shown in all SI units
- Common references table at the bottom — click a row to populate the inputs
| Mode | Reference | Common values |
|---|---|---|
| Power | 1 mW (dBm) | -30dBm = 1µW … 30dBm = 1W |
| Voltage | 1 V (dBV) | -20dBV = 100mV … 20dBV = 10V |
- Two-way conversion using two models, shown side-by-side:
- Gaussian system:
BW = 0.35 / t_r(standard oscilloscope spec) - Single-pole RC:
BW = 0.22 / t_r(conservative)
- Gaussian system:
- Auto-SI formatting for both rise time and bandwidth
- Enter any 2 of V, I, R, P — the other two are computed
- All 6 combinations supported
- Each field has its own SI unit selector (e.g. kV/V/mV/µV, A/mA/µA/nA, MΩ/kΩ/Ω/mΩ, kW/W/mW/µW/nW)
- Result cells show known values in blue and computed values in green
- If you fill more than 2 fields, the 2 most recently edited are used as inputs
- Mode toggle — Float32 (32-bit) or Double64 (64-bit)
- Accepts decimal floats (
3.14,-1.5e-5,NaN,Infinity) or hex (0x3F800000,0x3FF0000000000000) - Color-coded bit grid:
- 🟥 Sign (1 bit)
- 🟧 Exponent (8 bits f32 / 11 bits f64)
- 🟦 Mantissa (23 bits f32 / 52 bits f64)
- Decoded info table shows:
- Sign, raw + biased exponent, actual exponent (2ⁿ)
- Mantissa hex value, implied leading bit (1 for normal, 0 for denormal)
- Category badge — Normal · Denormal · Zero · Infinity · NaN
- Final value and its hex representation
open index.html # macOS
xdg-open index.html # Linux
start index.html # Windows
Or just drag index.html into any browser tab.
| Key | Action |
|---|---|
1 |
Number tab |
2 |
Memory tab |
3 |
Freq ↔ Time tab |
4 |
dB tab |
5 |
Rise / BW tab |
6 |
Ohm tab |
7 |
IEEE 754 tab |
c |
Toggle compact mode |
Enter |
Evaluate expression (Number tab) |
↑ / ↓ |
Cycle through expression history (Number tab) |
Tab shortcuts (
1–7andc) are active only when focus is not inside an input field.
Click ☾ / ☀ in the header to toggle. Saved across sessions.
Click Compact to shrink spacing and bit size — useful on smaller screens.
The following are saved in localStorage and restored on reload:
- Active tab
- Theme (light/dark)
- Compact mode
- Last 20 expressions entered in the Number tab
BitBench is a Progressive Web App — install it on any device and it opens in its own window with offline support.
- Open the site in a browser tab
- Click the install icon (⊕ or computer-with-arrow) in the address bar — or use the browser menu → "Install BitBench"
- The app opens in a standalone window and gets a launcher entry
- Open the site
- Tap the menu (⋮) → Add to Home screen / Install app
- Confirm — the app appears on the home screen with its own icon
- Open the site in Safari
- Tap the Share button → Add to Home Screen
- The app icon is added to the home screen and launches in standalone mode
After the first visit, a service worker caches the app shell, so it works without a network connection.
This repo includes a GitHub Actions workflow that automatically publishes the site whenever you push to main.
- Push this repo to GitHub:
git remote add origin https://github.com/<you>/<repo>.git git push -u origin main
- Enable Pages manually (required — the workflow can't do this for you):
- Go to the repo on GitHub → Settings → Pages
- Under Build and deployment → Source, choose GitHub Actions
- Save (no workflow selection needed — yours is already detected)
- Re-run the failed deploy:
- Go to Actions → Deploy to GitHub Pages → Re-run failed jobs
- Or push any new commit to
main
- Once green, the site URL appears in the workflow run summary (also visible at Settings → Pages).
Why this manual step? GitHub's default workflow token can't create a Pages site from scratch — only an authenticated repo admin can flip it on the first time. After that, the workflow handles every subsequent deploy on its own.
See .github/workflows/deploy.yml. It uses the official GitHub Pages actions:
actions/checkout@v4actions/configure-pages@v5actions/upload-pages-artifact@v3actions/deploy-pages@v4
The deployed URL will be https://<you>.github.io/<repo>/ (printed in the Actions log).
Service workers don't work over file://, so to test PWA install / offline behavior locally use a tiny static server:
python3 -m http.server 8000
# then open http://localhost:8000/Plain editing without PWA testing works fine by just opening index.html in a browser.
| File | Purpose |
|---|---|
index.html |
The entire app (HTML + CSS + JS) |
manifest.webmanifest |
PWA manifest — name, icons, theme color, display mode |
sw.js |
Service worker — caches the app shell for offline use |
icon.svg |
App icon (scalable, used by PWA install and browser tab) |
.github/workflows/deploy.yml |
GitHub Actions workflow that deploys to Pages |
BigInt support required:
- Chrome 67+
- Firefox 68+
- Safari 14+
- Edge 79+
PWA install support varies — Chrome/Edge/Brave on desktop and Android offer the smoothest experience. Safari supports Add-to-Home-Screen on iOS.
Designed by Nilesh M · © 2026 · All rights reserved