How to Read the Bitclock

The bitclock in the corner of every page isn’t the most functional clock in the world, but I thought it was neat enough to add. The code I used is adapted from the great O’Reilly book PHP Hacks.

The overall scheme of the bitclock

The values of the individual bits are described above. To figure out the time simply add the values of the bits in the hours column to get the hour, the minutes column to get the minutes, and the second column to get the seconds. For example…

Sample Bitclock

The time in this clock is equal to 1:14:06 PM (Hours = 1+4+8 = 13 = 1 PM; Minutes = 2+4+8 = 14; Seconds = 2+4 = 6)

And that’s all there is…