Edinburgh Informatics wall – code and solution

Posted on September 27, 2010

0


(Reposted from my ex-tumblr account)

Edinburgh Infomatics - Wall of Sponsors

The lightboard from the Forum of Infomatics at Edinburgh. Most natives, when asked, replied that the dots and gaps were the sponsor names rendered in ASCII or some varient.

I have yet to crack this or see how to read in numbers from the board such that I get sensible results.

I’ve tried taking it in horizontal bytes (48 columns -> 8 * 6 bits), vertical bytes, little/bigendian, groups of 4 bits (0-31 + alphabetic offset), latin-1, UTF-16, 7bit ASCII…

http://www.flickr.com/photos/ben_on_the_move/3786549141 is a picture of the dots and gaps rendered to white (dot) squares and dark (blank) squares, with a red line indicating the 8 “bit” line should anyone wish to do it themselves.

110101001110100001100101101000000101010111101110
011010011111011001100101011100101111001101101001
011101001111100110100000011011110110011010100000
110001011110010001101001111011101110001011110101
011100101110011111101000101000000111011101101111
111101010110110011100100101000000110110001101001
111010110110010110100000011101000110111110100000
011101001110100011100001111011101110101110100000
011010010111010011110011101000001111001111110101
111100001111000001101111011100100111010001100101
011100101111001110100000011001100110111101110010
101000000111010011101000011001010110100101110010
101000001110011101100101111011100110010101110010
011011111111010111110011101000000110001101101111
111011100111010001110010011010011110001011110101
011101000110100101101111111011101111001110100000
011101000110111110100000011101001110100001100101
101000001100100111101110011001100110111101110010
111011011110000101110100011010010110001111110011
101000001100011001101111011100101111010111101101

I can’t spot any obvious images in there, there are columns of ‘on’ however:

10th, 19th, 27th, 34th and the 43rd column – I thought I had something here, as the gaps were 10,9,8,7, … but then 9. Still, could be something. So, is it a 48-bit wide interface, with 5 lines upstream?

Taking them to be numbers (number n at the nth “spot”), the first few lit numbers are (just as a finger in the wind effort, just to see if there is anything obvious)

1,2,4,6,9,10,11,13,18,19,….

with gaps:

1,2,4,3,1,1,2,5,1,…

Taking the blanks to be important:

3,5,7,8,12,14,15,16,17,…

and the gaps between those

2,2,1,4,2,1,1,1,…

Nothing is leaping out at me – the 3,5,7,etc line looks promising, but I can’t put my finger on it. It’s not the decimal points of PI, e, or anything I can recognise.

The binary doesn’t correspond to classic ‘messages’ that I know, like the Arecibo message, the Voyager content, compiled code/image header…

Bottom line is, it’s going to be more simple than I am figuring. Answers on a postcard plz.

— SOLVED —

Absolutely couldn’t have been done without @regularfry spotting the 7-bit ASCII lurking in the 8-bits: http://gist.github.com/174286

{script}.py

===========================================

RAW_WALL_BITS = """110101001110100001100101101000000101010111101110
011010011111011001100101011100101111001101101001
011101001111100110100000011011110110011010100000
110001011110010001101001111011101110001011110101
011100101110011111101000101000000111011101101111
111101010110110011100100101000000110110001101001
111010110110010110100000011101000110111110100000
011101001110100011100001111011101110101110100000
011010010111010011110011101000001111001111110101
111100001111000001101111011100100111010001100101
011100101111001110100000011001100110111101110010
101000000111010011101000011001010110100101110010
101000001110011101100101111011100110010101110010
011011111111010111110011101000000110001101101111
111011100111010001110010011010011110001011110101
011101000110100101101111111011101111001110100000
011101000110111110100000011101001110100001100101
101000001100100111101110011001100110111101110010
111011011110000101110100011010010110001111110011
101000001100011001101111011100101111010111101101
"""

# Dirty hack
BITS = "".join(RAW_WALL_BITS.split("\n"))

def bintodec(binstring):
  """MSB first"""
  index, total = 0, 0
  for bit in binstring[::-1]:
    if bit == "1":
      total += 2 ** index
    index += 1
  return total

MESSAGE = ""

while (BITS):
  parity, sevenbits, BITS = BITS[0], BITS[1:8], BITS[8:]

  # Check parity? bah and pshah - oh, go on then
  if int(parity) == sevenbits.count("1") % 2:
    pass
  else:
    raise Exception("Whoopsie!")

  MESSAGE += chr(bintodec(sevenbits))

print MESSAGE

===========================================

which results in:

“The University of Edinburgh would like to thank its supporters for their generous contributions to the Informatics Forum”

Advertisements
Posted in: Uncategorized