Skip to content
CertoflowCertoflow
Developer Tools

Binary Converter

Convert numbers between binary, octal, decimal, and hex.

Example

In:
255 (decimal)
Out:
11111111 (binary) · FF (hex) · 377 (octal)

Enter a number and convert between binary, octal, decimal, and hex.

Guide

Introduction

Computers store numbers in binary. Humans write them in decimal. Compilers accept hexadecimal literals. Unix file permissions use octal. Fluency converting between bases separates debugging a bitmask permission error in thirty seconds from staring at 755 wondering why a script won't execute.

Certoflow's Binary Converter accepts a number in any of four bases — binary, octal, decimal, or hexadecimal — and displays equivalent representations in all other bases simultaneously.

What this tool does

Select your input base, enter a value, click Convert. Output lists:

binary: 11111111
octal: 377
hex: FF

(when converting decimal 255)

No mode switching required to see all representations — essential when documentation references one base and your debugger displays another.

How it works

JavaScript parseInt(value, radix) converts input to a single integer, then toString(radix) emits each target base. Validation catches:

  • Invalid digits for the selected base (e.g., 9 in octal)
  • Empty input
  • Non-integer garbage characters

Results update synchronously in the browser.

Quick reference table

DecimalBinaryOctalHex
81000108
15111117F
25511111111377FF
256100000000400100

Real-world examples

Unix file permissions

chmod 755 means:

  • Owner: 7 = 111 (rwx)
  • Group: 5 = 101 (r-x)
  • Other: 5 = 101 (r-x)

Convert 7 from decimal to binary to verify each permission bit.

IPv4 subnet masks

Subnet mask 255.255.255.0 → each octet converts to binary for CIDR calculations. 25511111111 confirms eight network bits in that octet.

Color manipulation in graphics programming

Extract green channel from #00FF00:

  • FF hex → 255 decimal → 11111111 binary
  • Bitwise AND with mask isolates channel

Hardware register documentation

Datasheet states register bit 3 enables DMA. Confirm bit position by converting register default 0x0A to binary 1010 and reading bit index.

Common mistakes

Entering binary without selecting binary input base. Typing 11111111 in decimal mode parses as eleven million, not 255.

Expecting signed integer two's complement. This tool handles non-negative integers. Interpreting 11111111 as -1 requires 8-bit signed context not applied automatically.

Precision loss on huge values. JavaScript integers above 2^53 lose precision. 64-bit register values need BigInt-aware tools.

Confusing with Binary Translator. That tool maps text characters to bit strings (A01000001). This tool converts numeric values between bases.

Forgetting leading zeros are cosmetic in numeric value. 00001111 binary equals 1111 binary numerically — but leading zeros matter when documenting fixed-width bit fields.

Use cases

TaskExample
chmod troubleshootingDecimal → binary for permission bits
Interview prepConvert between bases under time pressure
Embedded CVerify #define hex matches expected binary
Network engineeringOctet decimal → binary for ACL rules
Game moddingHex memory addresses → decimal for cheat engines

Bit width awareness

When documentation specifies "16-bit value," mask results accordingly:

  • 16-bit max: 65535 (decimal) = FFFF (hex) = 1111111111111111 (binary)

Values exceeding the documented width indicate overflow or documentation error.

Cluster integration

After base conversion, encode ASCII protocol strings via Binary Translator. Cross-check hex output with Hex Converter when working with string-encoded hex dumps. Schedule periodic jobs discovered during bitmask audits using Cron Expression Generator.

Floating-point caveat

This tool converts integers only. IEEE 754 floating-point values (3.14, 0.1) require dedicated float bit-layout tools showing sign, exponent, and mantissa fields separately. Do not parse float literals through integer base conversion expecting meaningful results.

Permission bit reference (octal chmod)

Octal digitBinaryMeaning
7111rwx
6110rw-
5101r-x
4100r--
0000---

Convert each chmod digit through this tool when explaining permission errors to junior developers — visual binary makes "missing execute bit" immediately obvious.

Network prefix length shortcut

CIDR /24 means 24 leading one bits in subnet mask. Convert decimal 255 to binary once, recognize eight consecutive ones, repeat for three octets — that pattern recognition speeds subnet troubleshooting during outage calls.

IPv6 addresses use hex groups — this decimal/binary tool complements but does not replace full IPv6 address calculators for 128-bit address arithmetic.

Summary

Binary Converter is the pocket reference for numeric base translation — the operation so fundamental that senior engineers forget how often juniors need it until production permission bugs appear. One input, four outputs, zero server round trips.

Frequently Asked Questions

Can I convert negative numbers?
This tool handles non-negative integers using JavaScript parseInt semantics. Signed two's complement conversion for fixed bit widths is a separate operation.
What is the largest value supported?
JavaScript safely represents integers up to 2^53 - 1. Larger values may lose precision. For 64-bit bitwise work, use language-native big integer types.
Do I need a 0x prefix for hex input?
No. Select Hex as the input base and enter digits like FF or 2A without a prefix.
How is this different from Binary Translator?
Binary Converter converts numeric values between bases. Binary Translator encodes human-readable text as sequences of bits and decodes bit strings back to characters.
Why learn base conversion?
Permission flags in Unix (chmod 755), IPv6 addresses, color channels, and hardware register documentation all require fluency moving between bases.

Continue with these related utilities.