This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LOOKUP TABLES

I need to know about what a lookup table exactly is. I'm studying the 8051 uC, I am following the book "The 8051 Microcontroller, by I. Scott MacKenzie". There's nothing much mentioned about lookup tables, only a tiny one-paragraph section. It's not clear to me what a lookup table is and why is it required.

Basically I need to know the following:
•what a lookup table is
•how to create a lookup table
•accessing a lookup table
•how is it stored in memory

Help would be much appreciated. Thank you :)

Parents
  • A lookup table is a general software/hardware concept, so a book about a specific processor or a specific programming language doesn't have much reason to describe the concept.

    A lookup table is a one-dimensional or multi-dimensional array/vector where you use one or more index/indices into the table to lookup a new value.

    So you might take the ID of an article as index and lookup the price of the article. Or a board game might have different pieces, where the lookup table contains the name - or position - of the individual pieces. Or the x,y position might be used to lookup if a piece is already at that location.

Reply
  • A lookup table is a general software/hardware concept, so a book about a specific processor or a specific programming language doesn't have much reason to describe the concept.

    A lookup table is a one-dimensional or multi-dimensional array/vector where you use one or more index/indices into the table to lookup a new value.

    So you might take the ID of an article as index and lookup the price of the article. Or a board game might have different pieces, where the lookup table contains the name - or position - of the individual pieces. Or the x,y position might be used to lookup if a piece is already at that location.

Children