[Xfce-bugs] [Bug 15607] New: Fixes and new binary clock mode

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Fri Jun 14 02:21:31 CEST 2019


https://bugzilla.xfce.org/show_bug.cgi?id=15607

            Bug ID: 15607
           Summary: Fixes and new binary clock mode
    Classification: Xfce Core
           Product: Xfce4-panel
           Version: Unspecified
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: Clock
          Assignee: xfce-bugs at xfce.org
          Reporter: felipe.contreras at gmail.com
  Target Milestone: Panel 4.14

A true binary clock shouldn't based on hours (mod 12), but on bits (mod
2).

Take for example the following clock:

  1010010000100000

In order to make sense of it we would have to find out if it's
binary-coded decimal (BCD), or sexagesimal. And then if it's packed or
not, and where the divisions are.

But we could say this number is a binary... A true binary.

To see if this is the highest part (past 12) or the lowest part (before
12), we just look at the most significant digit '1'. So it's past noon.

Then of those later 12 hours are we in earlier or later? We look at the
second digit '0', so it's between 12-18; We still have a quarter of the
day left. We continue like that until the last digit, which is similar
to a second, but not quite.

This is a 16-bit binary clock; that is: a clock whose value is a real
binary, on which you can do binary operations. By dividing the day into
2 ^ 16 equal parts it's easy to represent the most and least significant
  parts of a day.

  000: day started
  100: past noon
  010: early morning (6am)
  110: afternoon (6pm)
  001: 3am
  011: 9am
  101: 3pm
  111: 9pm

We can't call this the true true binary clock, but it pretty much is.

In order to represent minutes (not seconds) we need the first 10 most
significant bits.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list