(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

https://zh.wiktionary.org/wiki/%E5%84%84%E5%84%84

edited 06.10.2023
created 30.09.2023
EOF

[+] click to leave a comment [+]
the comment system on this blog works via email. The button
below will generate a mailto: link based on this page's url 
and invoke your email client - please edit the comment there!

[optional] even better, encrypt the email with my public key

- don't modify the subject field
- specify a nickname, otherwise your comment will be shown as   
  anonymous
- your email address will not be disclosed
- you agree that the comment is to be made public.
- to take down a comment, send the request via email.

>> SEND COMMENT <<




2024-05-04 ♦ Live A/V Show in Rochester via Paloma Kop ♦ RSS Feed April 21, 2024
Live audiovisual show in Rochester, NY... Read more↗

2024-04-21 via mrshll.com April 21, 2024
Well, it's real now. We are moving to Nashville. I came to Boston in 2009 to study computer science and stayed for the career opportunities, loud and then quiet music scene (where I met Alejandra), and the wonderful friends we've made over the ye…

Āyen, Pōm, and ITGBTW Remixes via Helvetica Blanc April 19, 2024
The newest Wormsong entry, Āyen, marks the beginning of a little interactivity in the narrative. After each entry goes live, I'll post a choice on Patreon. All patrons can vote, and their choices will allow us to explore the Realms together! I don'…

Generated by openring from webring