ariya.io About Talks Articles

Seven-Segment Problem

1 min read

After too long working on a prototype board, I had an idea to invent this question.

.

You have a 7-segment display. A byte is sent to the display, 7 bits are used to switch on (if the bit is set) or switch off (if the bit is reset) the segments. One bit in this byte is not used and always zero.

Values in the byte which correspond to decimal number (0 to 9) shown in the display are summarized as follows:

"0"    0xE7 
  "1"    0x22 
  "2"    0xAD 
  "3"    0xAB 
  "4"    0x6A 
  "5"    0xCB 
  "6"    0xCF 
  "7"    0xA2 
  "8"    0xEF 
  "9"    0xEB 

Find out what value you must send so that the display shows “E”.

In an interview, see how fast your candidate can get the answer (of course, you can replace “E” with another letter). Also, if he or she spends too much time studying number “8”, time to try another candidate…

Related posts:

♡ this article? Explore more articles and follow me Twitter.

Share this on Twitter Facebook