• Home
  • About
    • About The Coder
    • Language List
  • The Rules
    • Rule #1: Clarity Trumps Everything
    • Rule #2: Source Code is for Humans
    • Rule #3: Don’t Ignore Warnings
    • Rule #4: Comment As You Go!
    • Rule #5: Always Use Parentheses
  • CS-101
  • Guestbook

The Hard-Core Coder

~ I just can't stop writing code!

The Hard-Core Coder

Tag Archives: state table

Full Adder Code

05 Sunday May 2019

Posted by Wyrd Smythe in CS101

≈ Leave a comment

Tags

finite state machine, FSA, FSM, full adder, half adder, Python, state engine, state table, truth table

I was involved in a debate recently about whether a full adder logic circuit is a computer. The computer science answer is: “No, not as we define a computer.”

I plan to address that answer in detail on my main blog. Here I wanted to show some of the different ways a full adder can be modeled and implemented.

Continue reading →

State Engines, part 3

25 Wednesday Nov 2015

Posted by Wyrd Smythe in CS101

≈ Leave a comment

Tags

computer, computer code, computer programming, computer science, Python code, state engine, state table

In the first two parts of this series I’ve introduced state engines and taken apart a specific instance of an engine. Now it’s time to tie together the design idea with approaches to building a variety of such engines.

Because the programming logic is in the state table, the engine can be fairly generic. That means it’s possible to create a state engine framework you can reuse for a variety of applications.

Continue reading →

State Engines, part 2

11 Wednesday Nov 2015

Posted by Wyrd Smythe in CS101

≈ Leave a comment

Tags

computer, computer code, computer programming, computer science, Python code, state engine, state table

Last time I introduced state engines and state tables. I showed parts of a simple implementation of one in Python. It parsed the language introduced in Little Programming Languages. This post continues that, so be sure you’ve read that first article.

I got as far as the state table implementing the process, and that’s where this post picks up. I’ll also get into the SourceReader class that does the heavy lifting.

Continue reading →

State Engines, part 1

08 Sunday Nov 2015

Posted by Wyrd Smythe in CS101

≈ Leave a comment

Tags

computer, computer code, computer programming, computer science, state engine, state table

At one point in my career, the state engine (SE) was one of my favorite AWK hammers. At the time much of the work involved text processing or, in some cases, serial byte processing (which is not quite the same thing). That sort of thing is right in the wheelhouse for a state engine.

They are a very useful tool and an important part of any programmer’s toolkit.

Continue reading →

Follow The Hard-Core Coder on WordPress.com

The Posts

  • Thinking Ahead
  • Brian Kernighan: Successful Language Design
  • My Python App Framework
  • Multiplication Visualized
  • Square Root of 2
  • Life With Class
  • John Conway’s Life
  • Python Decorators, part 2
  • Python Decorators, part 1
  • Function Currying

The Topics

  • Blog (4)
  • CS101 (29)
  • Fun (22)
  • Interesting (1)
  • Opinion (12)
  • Stories (12)
  • Uncategorized (1)

The Month

April 2021
M T W T F S S
 1234
567891011
12131415161718
19202122232425
2627282930  
« Feb    

The Past

It’s me!

Wyrd Smythe

Wyrd Smythe

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts.

View Full Profile →

The Main Blog

Visit Logos con carne

Lots of wyrds... with meat!

Posts

RSS Feed

Comments

RSS Feed

Enter your email address to follow The Hard-Core Coder and get email when there is a new post.

Blog at WordPress.com.