Forum Discussion
Altera_Forum
Honored Contributor
8 years agoDifference between "logic" and "bit" data types.
Hi all, As we know "logic" data type has 4 states = 0, 1, X & Z, where as "bit" has only 2 states = 0 & 1. Generally we can see use of "logic" as data type for all kind of signals on interne...
Altera_Forum
Honored Contributor
8 years agoMost people use logic when they could have used bit. The advantage of using logic is that you will see unknowns in simulation if something hasnt been given a value, or you get multiple drivers somewhere. With bit, errors may not be so obvious as X will not propogate and you'll only get a '0'.
But you are right, bit and reset should always be '1' or '0', so having them as bit wont really hurt.