# Can Truth Table replaces Logic Gates?

## Recommended Posts

in Truth Table, wiki

# Section: Applications of truth tables in digital electronics

It says, "In digital electronics and computer science (fields of applied logic engineering and mathematics), truth tables can be used to reduce basic boolean operations to simple correlations of inputs to outputs, without the use of logic gates or code. "

How does it work? That is only using Truth Table, without the use of logic gates or code.

Edited by PeterBushMan
##### Share on other sites

• PeterBushMan changed the title to Can Truth Table replaces Logic Gates?

A ROM is a form of truth table.

##### Share on other sites

From later in the Truth Table wiki

Quote

Note that this [truth] table does not describe the logic operations necessary to implement this operation, rather it simply specifies the function of inputs to output values.

So, I think, this wiki is stating that you can have a truth table with or without the additional steps required to implement it, which seems rather obvious.

Complementary to Studiot, I can't see any way to implement a nontrivial truth table without at least logic gates.

The Wiki refers to Logic Gate  for practical implementation...

##### Share on other sites

I would like to see a comparison of Truth tables vs Logic gates using Water flow

##### Share on other sites

Programmers, especially in the past, use lookup tables (LUTs), to speed up an extensive mathematical algorithm.

In the '80 years, in CPUs without multiplication implemented in hardware, LUTs were even used for multiplication and division.

Multiplying 8 bits by 8 bits requires 65536 16-bit LUTs = 128 KB (which can be in ROM!)

"An n-bit LUT can encode any n-input Boolean function by storing the truth table of the function in the LUT. This is an efficient way of encoding Boolean logic functions, and LUTs with 4-6 bits of input are in fact the key component of modern field-programmable gate arrays (FPGAs) which provide reconfigurable hardware logic capabilities."

Example in C/C++:

uint16_t multiply_lut[ 65536 ]; // Initiated by the user once at startup.

uint16_t multiply( uint8_t src1, uint8_t src2 ) {
uint16_t result = multiply_lut[ (uint16_t) ( src1 << 8 ) | src2 ];
return( result );
}

## Create an account

Register a new account