# (fluff) western numbering is unfit for computer science, embrace the oriental

This post resolves the problem “how to pronounce 0x4_2000_0000_0000_0000” once and for all.

It’s interesting how to name a large hex number. Let’s say we have a number
`42 000 000`

, you naturally call it 42 million. But what about `0x42000000`

?
First you don’t write it as `0x42_000_000`

because no one in their right mind
would divide their data into groups of one-and-a-half bytes. Wait, you say BASE64?
Is that even human readable?

It’s trivial to translate binary and hex into each other because every 4bits equal one hex digit, and every 8 bits is a byte! That’s heaven. But evil comes when you try to pronounce it in mind of humanoid with decimal fingers.

We invented the unit of K,M,G for 2^10, 2^20 and 2^30. Sounds great? No! The
inconsistency is that while K/M/G is convenient enough for binary with the power
of tens, 10,20,30 are not dividable by 4…. Therefore you can not easily
translate them into hex. 1K is 2^10, that is `0x400`

! And guess what `0x1 000`

is? It’s 4K!

Now we have a hex number: `0x4_2000_0000_0000_0000`

, read it please?

Oh… let’s say .. there are … 15 zeroes, so .. thousand, million, billion, trillion, quadrillion … oh it’s “forty two quadrillion in hex”! If we use the unit only to indicate to the number of tailing zeroes, it’s fine. But remember in code we divide hex strings into groups of 4, not 3! So if you read the number in such a way, both you and the listener need to convert the format back and forth.

Of course you can always name the number as “forty two with fifteen zeroes”. But you lose the intuition of the magnitude.We the decimal monkeys are doomed with the base ten? No, there is a remedy.

## the chinese numbering system:

For a larrrrrge number, we divide the digits into **groups of 4**, and instead of
thousand, million, billion,

Chinese | Latin | Scale | Equals(short scale) | Decimal Value | Expand to hex |
---|---|---|---|---|---|

万 | wan | *10000 | 10 thousands | 10^4 | 0x1_0000 |

亿 | yi | *10000 | 100 millions | 10^8 | 0x1_0000_0000 |

万亿 or 兆 | wanyi or zhao | *10000 | 1 trillion | 10^12 | 0x1_0000_0000_0000 |

京 | jing | *10000 | 10 quadrillion | 10^16 | … |

垓 | gai | *10000 | 100 Quintillion | 10^20 | … |

秭 | zi | *10000 | 1 septillion | 10^24 | … |

穰 | rang | *10000 | 10 octillion | 10^28 | … |

… | … | … | … | … |

Now what is

`0x4_2000_0000_0000_0000`

It’s 4 jing 2000 zhao. Or if we shorten it: `4j 2k z`

What about this:

in aarch64 linux memory layout, bpf jit region starts at ffff a000 0000 0000

it’s simple!:

`ffffjaky`

[+] click to leave a comment [+]