Happy happy Monday!
Today's programming problem is for those that love to tinker with hardware. Your goal is to create a function that converts the letters A-Z and 0-9 to their 7 segment display counterpart. Your function should return the binary values needed for the output (alternatively you can just pretty print 7 segment looking characters). You may find this image helpful.
Note: Some characters may be duplicated such as "U" and "V"
Comments:
Anonymous - 9 years, 11 months ago
Shouldn't there be more than one segment illuminated for a 1? I would think it's be "b" and "c"?
reply permalink
Max Burstein - 9 years, 11 months ago
You're definitely right. That image has a mistake. c should also be lit up.
reply permalink
Anonymous - 9 years, 11 months ago
Seems like a crappy solution but there is always :
Is there a more elegant way to do this?
reply permalink
David - 8 years, 11 months ago
A bit sadly, this is a rubber hits the road type of problem. At some point you need to define which segments are associated with each character. You might prefer assigning a number and using some bit magic to get the display mask, but then you really just change the look of the problem instead.
reply permalink