Base Converter & Bit Viewer
Bit Pattern — click any bit to flip
Two's Complement
—
One's Complement
—
Gray Code
—
Popcount (set bits)
—
IEEE 754 Float32 Visualizer
Click any bit to toggle ↓
Sign (1)
Exponent (8)
Mantissa (23)
Quick Reference — Common Values
| Description | Decimal | Hex | Binary | IEEE 754 Hex |
|---|---|---|---|---|
| Zero | 0 | 0x00 | 0000 0000 | 0x00000000 |
| −Zero (IEEE754) | −0 | — | — | 0x80000000 |
| +Infinity | +∞ | — | — | 0x7F800000 |
| −Infinity | −∞ | — | — | 0xFF800000 |
| NaN (canonical) | NaN | — | — | 0x7FC00000 |
| π (pi) | 3.14159… | — | — | 0x40490FDB |
| 1.0 | 1.0 | — | — | 0x3F800000 |
| 0.5 | 0.5 | — | — | 0x3F000000 |
| Max normal (F32) | 3.4028235e+38 | — | — | 0x7F7FFFFF |
| Min positive normal | 1.1754944e-38 | — | — | 0x00800000 |
| Max signed int8 | 127 | 0x7F | 0111 1111 | — |
| Min signed int8 | −128 | 0x80 | 1000 0000 | — |
| Max unsigned int16 | 65535 | 0xFFFF | 1111…1111 | — |
| Max unsigned int32 | 4294967295 | 0xFFFFFFFF | all 1s | — |
| 0xDEADBEEF | 3735928559 | DEADBEEF | 11011110… | — |
💡 Click any row's hex value in the tables above, or type directly into the inputs — all fields sync instantly.
Shift & Rotate
Input bits
Result bits
Result (hex)
—
Result (dec)
—
Bits shifted out
—
Bitwise Logic Operations
A bits
B bits
Result (A AND B)
Result (hex)
—
Result (dec)
—
NOT operations
NOT A (hex)
—
NOT B (hex)
—
Bit Inspector & Statistics
Popcount (set bits)
—
Zero bits
—
CLZ (leading 0s)
—
CTZ (trailing 0s)
—
Parity
—
Bit-reversed (hex)
—
Power of 2?
—
Highest set bit
—
Bit Field Extract & Insert
Extract bits [MSB : LSB]
Extracted (hex)
—
Extracted (dec)
—
Extracted bits (binary)
—
Set / Clear / Toggle a single bit
Set bit (hex)
—
Clear bit (hex)
—
Toggle bit (hex)
—
💡 Bit extraction follows Verilog slice notation:
value[MSB:LSB]. LSB=0 is the rightmost (least significant) bit.
Shift & Rotate — Quick Reference
| Operation | Symbol | Behaviour | Verilog | Use Case |
|---|---|---|---|---|
| Logical Shift Left | LSL / << | Shift left, fill 0s on right. Drops MSBs. | a << n | ×2ⁿ multiply |
| Logical Shift Right | LSR / >> | Shift right, fill 0s on left. Drops LSBs. | a >> n | ÷2ⁿ (unsigned) |
| Arithmetic Shift Right | ASR / >>> | Shift right, fill with sign bit. Preserves sign. | $signed(a) >>> n | ÷2ⁿ (signed) |
| Rotate Left | ROL | Bits wrap: MSB moves to LSB position. | (manual in Verilog) | LFSR, CRC, crypto |
| Rotate Right | ROR | Bits wrap: LSB moves to MSB position. | (manual in Verilog) | LFSR, CRC, crypto |
| Bitwise AND | & | 1 only where both inputs are 1. | a & b | Masking, clear bits |
| Bitwise OR | | | 1 where either input is 1. | a | b | Set bits, flags |
| Bitwise XOR | ^ | 1 where inputs differ. | a ^ b | Toggle, parity, Gray code |
| Bitwise XNOR | ~^ | 1 where inputs match. | a ~^ b | Comparators, LFSR feedback |
| Bitwise NOT | ~ | Invert every bit. | ~a | One's complement, masks |
Frequency ↔ Period Converter
Period
—
Frequency
—
Duty Cycle
Duty Cycle
—
Period
—
Common Clock Reference
| Clock | Frequency | Period | Half-period |
|---|
Setup Slack Calculator
Slacksetup = Tclk − Tclk2q − Tcomb − Tsetup − Tskew
Maximum operating frequency
f_max
—
Hold Slack Calculator
Slackhold = Tclk2q_min + Tcomb_min − Thold − Tskew_max
Digital Waveform Viewer
Each line:
SIGNAL_NAME pattern |
0=low 1=high x=unknown z=hi-Z |
Hex chars (0-9 a-f) = bus value per step.
Lines starting with # are ignored.
Timing Diagram
Enter signals above to generate waveform
Dynamic Power P = α · C · V² · f
P_dyn per gate
—
P_dyn total
—
Formula expansion
—
Leakage, IR Drop & Electromigration
Leakage Power P = I_leak × V_DD × N
P_leakage
—
% of dynamic (500M gates·1GHz·1V)
—
IR Drop ΔV = I × R
Electromigration J = I / (W × T)
Memory Size Calculator
Locations
—
Total bits
—
Total bytes
—
Human-readable size
—
Address Range
Start
—
End
—
Cache Calculator
Tag bits = Addr_bits − Index_bits − Offset_bits
Cache size
—
Tag bits
—
Index bits
—
Offset bits
—
Address breakdown [Tag | Index | Offset]
—
Common Cache Configurations
| Level | Size | Ways | Line | Latency |
|---|---|---|---|---|
| L1-I/D | 32 KB | 4–8 | 64 B | 4–5 cyc |
| L2 | 256 KB–1 MB | 8 | 64 B | 12–15 cyc |
| L3 (LLC) | 4–32 MB | 16 | 64 B | 30–40 cyc |
| DRAM | GBs | — | — | ~100 ns |
FIFO Depth — Burst / Sync
Min Depth = Burst_writes − (Burst_cycles × Read_rate) + Pipeline_overhead
Min depth
—
Next power of 2
—
Pointer bits (addr)
—
Gray ptr width (full/empty safe)
—
Utilisation at full
—
Verilog parameters
—
FIFO Depth — Async CDC
Depth ≥ ⌈(f_wr / f_rd) × (N_sync + burst_wr)⌉ + margin
Clock ratio f_wr/f_rd
—
Min depth (words)
—
Recommended (pow2)
—
Pointer bits (addr + 1)
—
Worst-case latency analysis
Wr→Rd sync delay
—
Rd→Wr sync delay
—
Total round-trip
—
Design rules for CDC FIFOs
| Rule | Reason |
|---|---|
| Use Gray-coded pointers | Only 1 bit changes per increment — safe to sync |
| Pointer width = log₂(depth) + 1 | Extra bit distinguishes full from empty |
| 2-FF synchronizer minimum | Reduces metastability probability to <10⁻¹⁸/yr |
| Conservative depth (pow-of-2) | Simplifies address decode & gray code generation |
| Never bypass synchronizer | Even 1-cycle violation causes metastability |
Type a value in any field — all other units in that group update instantly.
Fibonacci LFSR Generator
Feedback = XOR of tapped bit positions. Output = LSB per clock. Maximum-length sequence = 2ⁿ−1 states.
Output bit sequence (LSB each step)
—
State sequence
Period
—
Maximal length?
—
Common Maximal-Length Polynomials
| n | Polynomial | Taps | Period | Use |
|---|---|---|---|---|
| 4 | x⁴+x+1 | 3,0 | 15 | Small BIST |
| 7 | x⁷+x³+1 | 6,2 | 127 | Scrambling |
| 8 | x⁸+x⁶+x⁵+x⁴+1 | 7,5,4,3 | 255 | CRC-8 like |
| 16 | x¹⁶+x¹⁴+x¹³+x¹¹+1 | 15,13,12,10 | 65535 | PRBS-15 |
| 23 | x²³+x¹⁸+1 | 22,17 | 8M+ | PRBS-23 |
| 31 | x³¹+x²⁸+1 | 30,27 | 2.1B | PRBS-31 |
Gray Code Converter
▶ Normal number → Gray code
Gray code (hex)
—
Gray code (binary)
—
◀ Gray code → Normal number
Decoded number (hex)
—
Formula: G[i] = B[i] XOR B[i+1], G[MSB] = B[MSB] | Used in async FIFOs, rotary encoders, ADC thermometer code.
CRC Calculator
CRC Calculator
CRC (hex)
—
CRC (dec)
—
Frequently Asked Questions
How do I convert hexadecimal to binary in VLSI design?▼
Each hex digit maps directly to 4 binary bits. For example, 0xF = 1111, 0xA = 1010, 0xD = 1101. To convert 0xAD: A=1010, D=1101 → 10101101. Use the Base Converter above — type any hex value and the binary, decimal, and octal representations update instantly.
What is IEEE 754 and why does it matter in chip design?▼
IEEE 754 is the standard for floating-point arithmetic used in virtually all FPUs, GPUs, DSPs, and AI accelerators. A 32-bit float has 1 sign bit, 8 exponent bits (biased by 127), and 23 mantissa bits. When debugging RTL or simulation mismatches, being able to decode the raw 32-bit hex value is essential — the IEEE 754 Visualizer above lets you click individual bits and immediately see the decoded value.
How is two's complement calculated?▼
Two's complement = invert all bits (one's complement) and add 1. For example, +5 in 8-bit = 00000101. Invert → 11111010, add 1 → 11111011 = −5. Two's complement is used universally in digital arithmetic because addition and subtraction use the same hardware — the ALU doesn't need to know about the sign. The Base Converter shows both complements automatically.
What is Gray code and where is it used in VLSI?▼
Gray code (reflected binary) changes only one bit between consecutive values. It is used in rotary encoders, async FIFO pointers (to avoid multi-bit glitches across clock-domain crossings), flash ADCs, and state machine encoding for glitch-free transitions. Convert binary to Gray with: G[n] = B[n] XOR B[n+1], G[MSB] = B[MSB]. The Base Converter above shows the Gray code for any entered value.
What are special values in IEEE 754 (NaN, Infinity, denormals)?▼
IEEE 754 reserves special bit patterns: exponent=0xFF with mantissa=0 is ±Infinity; exponent=0xFF with mantissa≠0 is NaN (Not a Number, result of 0/0 or √−1); exponent=0x00 with mantissa≠0 is a denormal (subnormal) representing very small numbers near zero without normal precision; exponent=0x00, mantissa=0 is ±Zero. The IEEE 754 Visualizer highlights these cases automatically and shows which category the entered value falls into.
Why do VLSI engineers need a dedicated calculator?▼
VLSI engineers constantly work with hex/binary values in waveforms, need to verify IEEE 754 floating-point representations in FPU RTL, calculate timing slack during sign-off, estimate power at different operating points, and generate test patterns (LFSR/PRBS). General-purpose calculators don't support these workflows. This toolkit provides domain-specific tools — number systems, IEEE 754, timing, waveforms, power, LFSR — all in one place without any login or installation.