Whatup programmers (programming.dev)
submitted 4 months ago* (last edited 4 months ago) by to c/programming@programming.dev
 

To anyone reading, im leaving. The moderation on this place sucks.

I cant tell someone to add authentication to their app I cant tell anyone to self reflect

But people are allowed to bully others out of learning? yeah bye

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 4 months ago

Ah, sorry, I could have been more clear there. It can do arbitrary mappings between input values and output values. So for each possible 4-bit value, you can pick a different 8-bit value to be output.

For my case, I'm working with a 7-segment LED display, like the display on a microwave. It's got 7 LEDs arranged to display a number, plus an 8th LED for a decimal point. Like this:


|   |

|   |

.

if the ROM is getting 0000 for its input, it should light up all segments of the 7-segment display except for the horizontal one in the center, to display a zero. Then for the 0001 input, it should light up the two vertical segments on the right, leaving the rest dark, to display a one. And so on. Each output bit goes to a particular segment of the display.

To relate it more directly to programming, it's like having a 16 byte array. The input gives the array index that you want to access, and the output gives whatever byte is at that index.

  • source
  • parent