top of page

Sequential Logic, part 1: Truth Tables

Nick
Aug 6, 2024
2 min read

Truth tables come up in computer science classes, electrical engineering classes and, to a lesser extent, in relay logic. However, I think they are a fabulous way to understand what is happening. You draw out a set of inputs and their outputs.


Consider a situation where A and B are true to make C true. Trivial, obviously.

A

B

C

True

True

True

True

False

False

False

True

False

False

False

False

This is a pretty quick way to come up with circuits in ladder logic. In this case, you would write XIC(A) & XIC(B). If you write up the circuit for something more complex, you may find something similar. For instance, I found code that had a common failure bit calculated in logic and then reused some (but not all) of the alarms in series with it to execute. In this case, imagine that XIC(A) & XIC(C) had to be true in order for D to be true. What would that table look like?

A

B

C

D

True

True

True

True

True

False

False

False

False

True

False

False

False

False

False

False

Are there any circumstances where those extra lines of ladder help? No. Would they hurt? Probably not operationally, but it would complicate troubleshooting.


Truth tables are great, but I think they perform poorly when it comes to time dependent operations. What if you need something to true on just when something else comes true? For example, a reset pushbutton that resets a latched failure? For that, you need a digital timing diagrams (hopefully the post for September)...


If someone uses the terms AND, OR, NAND and NOR, they probably come from the computer science / electrical engineering background. If they use symbols like + (and) or V (or), they probably came from a math background. Coworkers using XIC (examine if closed) and XIO (examine if opened) would probably mean a background as an electrician. There are lots of equivalences.


Other great places to read include Geeks4Geeks, Wikipedia and LibreMath.


Stanford has a truth table generator. Play with it!



 
 
 

Recent Posts

See All
TLDR; Extreme Ownership

TLDR; gives you an opportunity to narrow down your reading list in the ICS / OT environment. I hope you have a chance to read this series regardless of your background. This series comes from a mana

 
 
 
TLDR; Kaban

TLDR; is intended to give the readers a competitive edge, and I can think of no better series than Kaban by Gary Metcalf. His three books offer a stepwise approach to implementing continuous improvem

 
 
 
TLDR; Tribe of Hackers

TLDR; offers you an opportunity to preview books relevant to our field. Usually, I try to cover a single book and give a brief overview. However, some books are so good that I end up reading the ent

 
 
 

1 Comment


robert50powell.9.5.8.4+abc123
Aug 25

Bài viết này ngắn gọn mà dễ hiểu thật, mình đọc liền một lượt là nắm được ý, cảm ơn bạn đã chia sẻ. Mình cũng có thói quen mỗi ngày ghé xem phần soi cầu XSMB, nhưng trước kia hay phải mở vài chỗ khác nhau để so sánh nên mất công lắm. Về sau mình tự ghi lại và gom chung cho tiện, rồi lưu thành một trang trên soicau247.com để lúc cần chỉ mở ra xem nhanh, đỡ phải lục lại từng nơi. Mình chủ yếu theo dõi số liệu cập nhật theo ngày để tiện ghi chú và đối chiếu thôi, chứ không có gì phức tạp. Nếu ai cũng hay theo dõi kiểu vậy thì…

Like

industrialcontrols

©2022 by industrialcontrols. Proudly created with Wix.com

bottom of page