How do you convert decimal to binary?
Divide the decimal number by 2 repeatedly, recording the remainders. Read the remainders from bottom to top. Example: 42 ÷ 2 = 21 r0 → 21 ÷ 2 = 10 r1 → 10 ÷ 2 = 5 r0 → 5 ÷ 2 = 2 r1 → 2 ÷ 2 = 1 r0 → 1 ÷ 2 = 0 r1. Reading remainders upward: 101010 = 42 in decimal.
How do you convert binary to hexadecimal?
Group binary digits into sets of 4 from right to left (padding with zeros if needed), then convert each group to its hex digit: 0000=0, 0001=1, …, 1001=9, 1010=A, 1011=B, 1100=C, 1101=D, 1110=E, 1111=F. Example: 11001010 → 1100 1010 → C A = 0xCA = 202 decimal.
What are common hex colors in web design?
Hex colors use 6 hex digits: #RRGGBB. White = #FFFFFF (255,255,255), Black = #000000 (0,0,0), Red = #FF0000 (255,0,0), Green = #00FF00, Blue = #0000FF. Each pair represents intensity 0–255. Well-known UI colors developers encounter globally: #FF0000 (pure red), #1DA1F2 (Twitter/X blue), #25D366 (WhatsApp green), #0D9488 (NeftCal teal — R:13 G:148 B:136). The # prefix is CSS notation; the actual value is 3 bytes (24-bit color).
What is a bitwise AND / OR / XOR operation?
Bitwise operations work bit-by-bit: AND (A & B) — 1 only if both bits are 1. OR (A | B) — 1 if either bit is 1. XOR (A ^ B) — 1 if bits differ. NOT (~A) — flips all bits. Left shift (A << n) — multiplies by 2ⁿ. Right shift (A >> n) — divides by 2ⁿ. These operations are fundamental in low-level programming, cryptography, and networking (subnet masks). Toggle the Signed/Unsigned button above the results to see two's complement interpretation alongside raw bits.
What is two's complement and signed vs unsigned?
Two's complement is how computers represent negative integers. To negate a number: flip all bits, then add 1. Example: +5 in 8-bit = 00000101. Flip bits: 11111010. Add 1: 11111011 = -5. The most significant bit (leftmost) indicates sign: 0 = positive, 1 = negative. This is why NOT(5) shows as 4294967290 in unsigned 32-bit, but -6 in signed 32-bit. Use the Signed/Unsigned toggle in the bitwise results panel to switch between both interpretations.
What is IEEE 754 and why does 0.1 + 0.2 ≠ 0.3?
IEEE 754 is the international standard for floating-point arithmetic used in virtually all processors. A 32-bit float has: 1 sign bit, 8 exponent bits (biased by 127), 23 mantissa bits. A 64-bit double has: 1 sign bit, 11 exponent bits (biased by 1023), 52 mantissa bits. Most decimal fractions (0.1, 0.2, 1/3) cannot be represented exactly in binary, so they're stored as the nearest representable value. This is why 0.1 + 0.2 gives 0.30000000000000004 in every programming language — it's a binary representation artifact, not a bug.
How does the Unicode / ASCII lookup work?
Standard ASCII covers code points 0–127 (English letters, digits, symbols). Unicode extends this to over 1 million code points covering Devanagari (Hindi), Tamil, Telugu, Chinese/Japanese/Korean (CJK), Arabic, Hebrew, emoji, and more. The lookup shows: the Unicode code point in U+XXXX format, the UTF-8 encoding (1–4 bytes), and the UTF-16 encoding. For example, the Hindi letter 'अ' is U+0905, encoded as 3 UTF-8 bytes (0xE0 0xA4 0x85). Emoji like '😀' are U+1F600, encoded as 4 UTF-8 bytes.