Skip to content

Comment on Your birthdate in the decimal expansion of Piparent

Comments

No, it's extracting the upper 4 bits of the byte, not the upper 8 bits of a 16-bit quantity.

This is actually a quite standard number format. Real computers like the 6502 http://www.6502.org/tutorials/decimal_mode.html and the IBM zSeries have harware support for that encoding http://en.wikipedia.org/wiki/Binary-coded_decimal#Packed_BCD and there are decoder chips like the 74LS48 that directly translate these nibbles to 7-segment display numbers.

Doh, of course.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.