Showing posts with label hex. Show all posts
Showing posts with label hex. Show all posts

A dictionary of words that are secretly numbers

Hexadecimal, the base-sixteen counting system computers use, borrows six letters, A to F, to count past nine. Programmers have long noticed that those letters spell things. Add a few digits that look like letters (0 for O, 1 for I, 2 for Z, 5 for S, 6 for G) and suddenly there are a lot of them.

How many? 1,775, not including the ones I didn't think of. So I wrote them all down, gave each one a definition, and made it into a dictionary.



My Favourite Hexadecimal Numbers treats this with complete seriousness. Every entry gets its value in hex, decimal and binary, a star rating, and a sober dictionary definition. The English words themselves are hidden, so each entry is a small puzzle. A few favourites:

F00D · ★★
Anything that can be eaten for nourishment. Also food for thought, which this book has little of.

6E01D · ★★★
The lumpy surface the oceans would form under gravity alone. The Earth is not round; it is geoid.

B00B5 · ★★★1 A foolish mistake; to make one. 2. A foolish person. 3. A breast, and the reason B00B5 is the most famous number in computing.

D00D00 · ★★★★
Excrement, in nursery language. Deep doodoo is the worst kind.

The star rating rewards long words with digits in disguise, so FACADE scores a modest one star, while DEAC1D1F1ED is a five-star specimen. There's also a Hall of Fame of hex words hidden inside real computers (DEADBEEF, CAFEBABE, 8BADF00D), a 100-question quiz, a hex word search and a colour puzzle.

The game

The dictionary doubles as the official referee for FACE0FF5, a word-tile game in base sixteen. Players draw eight hex tiles into their "register" (32 bits, naturally), spell words from the dictionary, and score each word's star rating. Dead digits (3, 4, 7, 8, 9) clog your hand, wild tiles cost you a star, any word can be challenged, and scores are kept in hex. The first player to reach sixteen shouts "0x10!" and wins. The rules and 112 printable tiles are in the book.

The name is eight hex digits, exactly 32 bits, which in computing is called a word. Sadly "faceoffs" isn't in the dictionary, so the name itself isn't a legal play. We checked.

๐Ÿ‘‰ My Favourite Hexadecimal Numbers

If you play a round of FACE0FF5, I'd love to hear how it goes.


๐Ÿ‘‰ My Favourite Hexadecimal Numbers

The book is written under my pen name, Ram, and lives alongside my other projects at ramapani.com.

What time is it (as a hexadecimal background colour)?

A short program that displays the current time as a hexadecimal background colour.  Source code is below, or you can download the executable for Windows.

Time is displayed as a hex colour (or 'color' if you prefer the incorrect American spelling)


     REM Hex colour clock
     REM T Street
     REM 2015-03-22
     REM based on idea by http://whatcolourisit.scn9a.org/
     
MODE 10: OFF
     PROC
_preventResize
     COLOUR 2, 180,180,180
     REPEAT
       
REM get the current time
       
a$ =  RIGHT$(TIME$,8)

       REM find hexidecimal rgb
       
r$ = MID$(a$, 1, 2)
       g$ = MID$(a$, 4, 2)
       b$ = MID$(a$, 7, 2)

       REM find denary colour value
       
red%   = VALLEFT$(r$,1)*16 + VALRIGHT$(r$,1)
       green% = VALLEFT$(g$,1)*16 + VALRIGHT$(g$,1)
       blue%  = VALLEFT$(b$,1)*16 + VALRIGHT$(b$,1)

       REM clear the screen to required colour
       
COLOUR 1, red%, green%, blue%
       COLOUR 1+128:CLS

       
REM display time
       
COLOUR 2
       *font Arial, 16b
       PRINTTAB(30,6)"The time is"
       *font Arial, 60b
       PRINTTAB(05,2)r$":"g$":"b$
       *font Arial, 32b
       PRINTTAB(07,7)"The colour is #"r$g$b$

       REM wait a mo'
       
OSCLI "refresh"
       WAIT 100
       OSCLI "refresh off"
     UNTIL FALSE


     
DEF PROC_preventResize
     REM prevent user resizing window
     
PRIVATE ws%
     SYS "GetWindowLong", @hwnd%, -16 TO ws%
     REM prevent user maximising window
     
SYS "SetWindowLong", @hwnd%, -16, ws% AND NOT &50000
     ENDPROC


#hexadecimal

Label

World Karma Game