# Category Archives: Concepts

## Conditional Flow: “pit-stops” and “detours”

Analogies are often the best tools to connect a program’s “functional logic” with the “abstract tools” of the programming language. Here, we outline the logical differences between common if-statement structures using a “Driving Analogy” drawn in parallel to a “Flow-Chart” and “Model Python Code.” We choose Python because it is one of the most intuitive and commonly used programming languages in biology.

## Understanding Binary with Poker Chips

Computers store information with transistors or “switches” that have an on (“1”) or off (“0”) state. As a result, they must perform mathematical and logical operations using a binary (base-2) numbering system. For example, as can be see above, computers represent our the decimal/base-10 number “113” with the binary/base-2 number: “1110001”.

## Understanding Boolean Logic Gates

Boolean algebra/digital logic is how computer hardware performs computations with a binary numbering system. In addition, Boolean operators (and, or, not, etc.) are critical components to all programming languages. The figure above conceptually summarizes the major Boolean Logic Gates using Venn Diagrams to represent the inputs (top) and outputs (bottom) that result.