Skip to content

dev.hardware

wire gauges, drill bits, RAID capacity and memory timings

Quick calculations for building and sizing hardware: how thick a wire or drill bit is, which bit to drill for a screw thread, how much space a RAID array leaves you, and how long memory takes to answer.

Tags: binary

  • awg the diameter of American Wire Gauge number gauge, in mm
  • drill_bit the diameter of a drill bit written as a number like “#7”, a letter like “F” or a fraction of an inch like “1/4”, in mm
  • tap_drill the drill bit to use before cutting a metric thread like “M6”, as a diameter in mm
  • raid the usable capacity of n disks of size disk in a RAID array of the given level
  • ram_latency the true latency of memory in ns, from its transfer rate in MT/s and CAS latency cl
awg(gauge: int) -> quantity

the diameter of American Wire Gauge number gauge, in mm

Gauges 0 to 40 are accepted, a larger number is a thinner wire

1
awg(12)2.05253 mm
2
awg(24) to in0.0201008 in
Example outputCtrl+Enter to run

See also raid

drill_bit(size: str) -> quantity

the diameter of a drill bit written as a number like “#7”, a letter like “F” or a fraction of an inch like “1/4”, in mm

Numbers run from #1 to #80, a larger number is a smaller bit, and letters from A to Z are bigger than #1

1
drill_bit("#7")5.1054 mm
2
drill_bit("F")6.5278 mm
3
drill_bit("1/4") to in0.25 in
Example outputCtrl+Enter to run

See also tap_drill, awg

tap_drill(thread: str) -> quantity

the drill bit to use before cutting a metric thread like “M6”, as a diameter in mm

It is the thread’s size minus its pitch, for the standard coarse pitch, or “M8x1” for a fine one. Sizes M2 to M24 are known

1
tap_drill("M6")5 mm
2
tap_drill("M8x1")7 mm
Example outputCtrl+Enter to run

See also drill_bit

raid(level: int, disk: quantity, n: int) -> quantity

the usable capacity of n disks of size disk in a RAID array of the given level

Levels 0, 1, 5, 6 and 10 are supported. RAID 1 mirrors every disk, and RAID 10 mirrors pairs, so it needs an even number of disks

1
raid(5, 4 TB, 4)12 TB
2
raid(10, 2 TB, 6)6 TB
Example outputCtrl+Enter to run

See also awg

ram_latency(rate: num, cl: num) -> quantity

the true latency of memory in ns, from its transfer rate in MT/s and CAS latency cl

Memory does two transfers per clock, so the clock is half the rate

1
ram_latency(6000, 30)10 ns
2
ram_latency(3200, 16)10 ns
Example outputCtrl+Enter to run
1
# how thick is 12 gauge wire?
2
awg(12)2.05253 mm
3
# the size of a number, letter or fraction drill bit
4
drill_bit("#7")5.1054 mm
5
# which bit to drill before tapping an M6 thread
6
tap_drill("M6")5 mm
7
# usable space of 4 disks in RAID 5
8
raid(5, 4 TB, 4)12 TB
9
# how long DDR5-6000 CL30 takes to answer
10
ram_latency(6000, 30)10 ns
Example outputCtrl+Enter to run

Example results generated on 2026-11-04. Ones using now, today or randomness will differ when you run them.