Binary Clock
The clock time written in bits, updating every second, with the place value printed under every lamp so the pattern can actually be read rather than admired. Two different patterns are called a binary clock and this page computes both for every moment: plain binary, where each field is one number and 18:31:40 is 10010 011111 101000, and BCD, where each decimal digit is written on its own in four bits and the same moment is 0001 1000 0011 0001 0100 0000. Pick any time zone from your browser's own database, or switch the clock to Set time and freeze it on a time you type, which is the way to work out why 13 hours is 1101 without waiting for one o'clock.
- Time
- --:--:--
- Mode
- Binary
- Zone
- UTC
- Bits
- --
- Show
- Clock
- Time zone
Plain binary: each field of the clock is one number in base two. Hours take five bits because they reach 23, minutes and seconds take six because they reach 59, and the lamp labels are the place values that add up to the number.
Common questions
- How do you read a binary clock?
- Each lamp is worth a number, and the lit ones are added together. Reading right to left the places double: 1, 2, 4, 8, 16, 32. So 10010 is 16 + 2 = 18, and 101000 is 32 + 8 = 40. This page prints the place value under every lamp and writes the sum out beside each field, so hours, minutes and seconds each show their own arithmetic instead of leaving you to count columns.
- What is the difference between a binary clock and a BCD clock?
- A plain binary clock writes each field as one whole number, so the hour 18 is 10010. A BCD clock, binary-coded decimal, writes each decimal digit separately in four bits, so 18 becomes 0001 1000: a 1 and an 8. Most desk clocks sold as binary clocks are BCD, because six short columns of lamps are easier to build and to read than three long ones. Read one pattern as though it were the other and you get 24 where the clock says 18, which is why the mode is named beside every reading here and both patterns are shown at once.
- Why is 13 hours 1101?
- Because 13 is 8 + 4 + 1, and those are the lamps that light: 1101 in four bits. The hours field on this page is five bits wide, since hours reach 23 and 23 needs five bits, so one o'clock in the afternoon reads 01101 there. In BCD the same hour is 0001 0011, a 1 and a 3. Switch the clock to Set time, type 13:00:00, and the page holds it while you check the arithmetic.
- How many bits does a binary clock need?
- In plain binary, five for the hours, because they run to 23, and six each for the minutes and seconds, because they run to 59: seventeen bits for the whole time. In BCD it is four bits per decimal digit, six digits, so twenty-four lamps, though a real BCD clock leaves some of them out. The tens of the hours never pass 2 and the tens of the minutes and seconds never pass 5, so a few lamps in those columns can never light. This page draws them pale rather than hiding them, so the missing rows on a hardware clock make sense.
- Can I freeze the clock on a particular time?
- Yes. Switch the Clock control to Set time and type the time in almost any form: 18:31:40, 18:31, 1831, 183140, 6:31:40 pm, or the words noon and midnight. The reading stops moving and the lamps hold, which is what makes it usable for learning or for teaching. Anything the box cannot read is refused by name rather than guessed at, so an hour past 23, a minute past 59, or a bare 18.5 each get their own message saying what to type instead. Switching back to Live picks the current time up again.
- Does it use my time zone, and what about daylight saving?
- It reads the instant from your device and converts it into whichever zone you pick, using your browser's own time zone database, so the offset is right for today's date rather than taken from a fixed table that goes stale. The zone list is the one your browser ships, your own zone is marked as this device, and the offset in use is printed with the date under the bits. The clock runs on 24-hour time, which is why the hours field needs five bits.
- Can I type bits in and get the time back?
- No, and the box says so rather than guessing: it takes the clock time, and the page writes the bits. If you want to convert a bit pattern to a number, the binary to text tool and the number base converter linked below do that in both directions, at any size.
- Does the clock send anything anywhere?
- No. Every conversion happens in the page, there is no account and nothing is uploaded. Your mode, zone and typed time are remembered in this browser only, and only once you change a control; the Start over button above the tool forgets them again. The Copy button puts the time, the zone and both bit patterns on your clipboard in one line.
Exact conversion of the clock time in the zone you choose, updated every second. Binary mode writes each field as one number; BCD mode writes each decimal digit separately, which is why the two look different at the same moment. It reads the clock on the device you are using, so it is only as right as that clock, and it cannot know whether your device is set correctly.