Home › The Stash

Binary, Hex and Data Sizes Explained (Tech+)

ReferenceOctober 31, 2026

ExplainerLevel beginnerTime ~12 minTool PowerShell, bashCost freeExam Tech+ 1

What you’ll know

What a bit and a byte are, how to read binary and hex, why your new drive looks smaller than the box said, and why a “1 gig” internet plan downloads at about 110 MB per second.

Why it matters. Every file size, download speed and storage upgrade is written in these units. Mix up bits and bytes, or decimal and binary gigabytes, and you’ll think something is broken when it isn’t. These are also the first questions on the Tech+ exam.

Bits and bytes

  • A bit is one 0 or 1, the smallest piece of data a computer stores.
  • A byte is 8 bits. One byte can hold 256 different values (0 to 255), enough for one letter such as A.
  • Four bits (half a byte) are sometimes called a nibble. One hex digit is exactly one nibble, which is why hex is so handy.

Three ways to write the same number

System Base Digits used 200 written this way
Decimal 10 0 to 9 200
Binary 2 0 and 1 11001000
Hexadecimal (hex) 16 0 to 9, then A to F C8

Reading binary: each position is worth double the one to its right: 128, 64, 32, 16, 8, 4, 2, 1. Add up the positions that hold a 1. For 11001000 that’s 128 + 64 + 8 = 200.

Reading hex: A = 10, B = 11 … F = 15. Each hex digit stands for 4 bits, so two hex digits make one byte. FF = 15×16 + 15 = 255, the biggest value one byte can hold. You’ll see hex in MAC addresses, colour codes like #FF0000, and IPv6 addresses.

Data sizes: why a 2 TB drive shows 1,863 GB

Unit Decimal meaning (drive boxes, internet plans) Binary meaning (what Windows actually counts)
Kilobyte 1 KB = 1,000 bytes 1 KiB = 1,024 bytes
Megabyte 1 MB = 1,000,000 bytes 1 MiB = 1,048,576 bytes
Gigabyte 1 GB = 1,000,000,000 bytes 1 GiB = 1,073,741,824 bytes
Terabyte 1 TB = 1,000,000,000,000 bytes 1 TiB = 1,099,511,627,776 bytes

Drive makers sell in decimal units. Windows divides by 1,024 but still prints “GB”. So a 2 TB drive (2,000,000,000,000 bytes) shows up in Windows as about 1,863 GB. Nothing is missing; it’s the same number of bytes, counted two ways. On our test PC, a 2 TB NVMe drive reports exactly 1,863.

Speed: bits per second vs bytes per second

  • Internet and network speeds use bits per second: Mbps, Gbps (small b).
  • Download windows and file copies show bytes per second: MB/s (big B).
  • Divide by 8 to convert. A 1 Gbps plan tops out at 125 MB/s, and you’ll usually see 110 to 117 MB/s once network overhead is taken out. A 300 Mbps plan is about 37 MB/s at best.

Letters are numbers too

Text is stored as numbers. In ASCII, capital A is 65, B is 66, and a space is 32. Unicode (usually saved as UTF-8) extends this to every language and emoji; plain English letters keep their ASCII numbers, while other characters take 2 to 4 bytes.

Steven bought a 2 TB drive, saw 1,863 GB and asked who stole 137 gigabytes. Nobody did. The box counts in thousands, Windows counts in 1,024s. I’m still letting him believe it was me. — Nyx

Try it

Windows PowerShell
PS> [Convert]::ToString(200,2)
 11001000
PS> [Convert]::ToString(255,16)
 ff
PS> [Convert]::ToInt32('11001000',2)
 200
PS> 1GB
 1073741824
PS> [int][char]'A'
 65

PowerShell’s 1GB really means 1 GiB (1,073,741,824 bytes), the same binary counting Windows uses for drive sizes.

Linux or WSL (bash)
$ echo "obase=2;200" | bc
 11001000
$ printf '%x\n' 255
 ff
$ echo $((2#11001000))
 200
$ printf 'A' | od -An -tu1
   65

bc is a calculator that comes with most Linux systems; od shows the raw byte values of text.

Where this fits

This is part of the free CompTIA Tech+ roadmap: computer basics in the order the exam teaches them.

NextComputer hardware: CPU, RAM, storage and ports→

Go deeper

Explainer, written by StashGrid with AI help and checked against the CompTIA Tech+ (FC0-U71) exam objectives before publishing. Every command was run on a Windows 11 PC and in Ubuntu 24.04 (WSL) on 30 Oct 2026. StashGrid isn’t affiliated with CompTIA. Spotted an error? Tell us.