Dec 15, 2007

Words that can be rendered in HEX

If you’re in IT, or just like to hack around with computers, you invariably run into HEX numbers. About the only fun thing with HEX is that since it uses the letters A-F, you can use it to write out words. 0xDEADBABE, 0xDEADBEEF, 0xBABECAFE, 0xDECAFBAD, and 0xDEFEC8ED (defecated) are the standard ones that come to mind.

You can use this command

egrep "^([a-fo]|ate|to|too|two|for|four)\*$" /usr/share/dict/words

to print out a list of words on a *NIX system that can be rendered in HEX using ‘0’ for ‘o’, ‘8’ for ‘ate’, ‘2’ for ‘to’/’too’/’two’, and 4 for ‘for’/’four’. On Mac OS X 10.5 (Leopard), the above command finds the following ‘words’:

a
aa
aba
abac
abaca
abacate
abaff
abate
abb
abed
abode
acate
acca
accede
ace
ad
adad
add
adda
added
ade
adead
ado
adobe
ae
aface
affa
afforce
afford
afore
ate
atef
atwo
b
ba
baa
baba
babe
baboo
bac
bacaba
bacao
bacca
baccae
baccate
baccated
bad
bade
bae
baff
baobab
bate
batea
bated
be
bead
beaded
beatee
bebed
bed
bedad
bedded
bedead
bedeaf
bee
beef
before
beode
bo
boa
bob
boba
bobac
bobbed
bobo
bocca
bocce
boce
bod
bode
boo
boob
bood
boof
c
ca
cab
caba
cabda
cabob
cacao
cad
cade
caeca
caffa
caffeate
caoba
cate
catwood
ce
cede
cee
coabode
coated
coatee
cob
cobaea
cobbed
cobcab
coca
cocco
coco
cocoa
cod
coda
code
codo
coe
coed
cofeoffee
coff
coffee
coo
cooba
cooee
coof
coto
d
da
dab
dabb
dabba
dace
dad
dada
dade
dado
dae
daff
dao
date
de
dead
deaf
deb
debate
decad
decade
decate
decode
dedo
dee
deed
deedeed
deface
defecate
deforce
do
doab
doated
dob
dobbed
dobe
doc
dod
dodd
dodded
dodecade
dodo
doe
doff
doob
doodab
doodad
e
ea
ebb
eboe
ecad
eddo
edea
efface
f
fa
facade
face
faced
fad
fade
faded
fae
faff
fate
fated
fatwood
fe
fed
fee
feed
feod
feoff
feoffee
feoffor
fob
fod
fodda
foe
foo
food
for
fora
forb
forbade
force
forced
ford
fordo
fore
forebode
foredate
foredefeated
foreface
four
o
oaf
obe
oboe
octoad
octoate
od
oda
odd
ode
oe
of
off
to
toa
toad
toatoa
tobacco
tobe
toco
tod
tode
toe
toed
toetoe
toff
toffee
too
toto
two