🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Manufacturing & Marine › Robotics / Mechatronics › Programmable Logic Controllers for Mechatronics › Lesson 2
MFG-MECH15-02 · Lesson 2 · 10 clock hours · theory

Number Systems and PLC Memory Organization

Objective. Students will convert values among binary, octal, hexadecimal, and decimal number systems and map PLC memory types (input image, output image, internal bits, integers, floating point) to their functional roles.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by a licensed engineer or certified journey-level tradesperson or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

Why Number Systems Matter in PLC Work

Programmable Logic Controllers store and process every piece of information—sensor states, timer values, motor speeds, analog signals—as groups of binary digits (bits). To read a tag database, trace a fault, or scale a 4–20 mA signal, you must move comfortably among four number systems: binary, octal, decimal, and hexadecimal. You also need to understand how PLC memory is organized so you know exactly where a value lives and what it means.

The Four Number Systems

Decimal (base 10) is everyday counting: digits 0–9, each column worth ten times the column to its right.

Binary (base 2) uses only 0 and 1. Each bit position represents a power of 2 (1, 2, 4, 8, 16, 32, …). A single bit is the smallest unit of PLC data. Eight bits form a byte; sixteen bits form a word; thirty-two bits form a double word (DWORD).

Octal (base 8) uses digits 0–7. Each octal digit represents exactly three binary bits. Older Allen-Bradley PLCs (SLC 500, PLC-5) use octal addressing for I/O slots and bit numbers (e.g., I:1/05 means input file, slot 1, bit 5 in octal).

Hexadecimal (base 16) uses digits 0–9 and letters A–F. Each hex digit represents exactly four binary bits (a nibble). Hex is the standard shorthand for 16-bit and 32-bit values in modern tag-based PLCs, error codes, and Ethernet/IP data tables. You will see hex addresses prefixed with `0x` (e.g., `0x1A3F`).

BCD (Binary-Coded Decimal) encodes each decimal digit in its own four-bit group. Thumb-wheel switches and some legacy displays send data in BCD. Decimal 47 in BCD is `0100 0111` (4 = 0100, 7 = 0111).

Converting Between Systems

PLC Memory Organization

Regardless of brand, PLC memory is divided into regions with distinct functions. Understanding these regions is the foundation for reading ladder logic and diagnosing faults.

Input Image Table (Input File / Input Tags)

At the start of every scan cycle, the CPU reads every physical input—pushbuttons, limit switches, proximity sensors—and copies their ON/OFF states into the input image table. Ladder logic examines this snapshot, not the live wire, during the solve phase. In SLC 500 style addressing the file is `I:`, followed by slot and bit: `I:2/07`. In tag-based systems (Studio 5000, TIA Portal), descriptive names like `LS_ConveyorHome` reference the same underlying bit.

Output Image Table (Output File / Output Tags)

After solving logic, the CPU writes results to the output image table. At the end of the scan, it copies these values to physical outputs—solenoids, contactors, indicator lights. Modifying an output tag in the tag database lets you force an output ON or OFF during commissioning (use caution; follow lockout/tagout before working near actuators).

Internal (Bit) Memory

Internal bits (`B3` file in SLC 500; boolean tags or memory bits in modern systems) hold intermediate logic states that are not tied to physical I/O—seal-in rungs, flags, interlock conditions. They consume no wiring but are critical to program flow.

Integer and Counter/Timer Files

Word-addressed PLCs use integer files (`N7`) for 16-bit signed values (–32,768 to +32,767). Counter (`C5`) and timer (`T4`) files store accumulated counts, preset values, and status bits in structured elements. In tag-based PLCs these become DINT (32-bit signed integer) or INT tags and structured timer/counter UDTs.

Floating-Point Memory

Analog process values—temperature in °C, flow in gpm, pressure in PSI—are usually stored as 32-bit IEEE 754 floating-point numbers (REAL type). Scaled 4–20 mA readings end up here after the analog input module converts raw counts.

Safety Note: Working Around Live PLCs

When the instructor demonstrates live tag toggling, the trainer is energized. Never reach into the panel or touch terminals. Observe NFPA 70E shock boundaries: unqualified persons stay outside the limited approach boundary. Before connecting or disconnecting any wiring on a PLC trainer, apply OSHA 29 CFR 1910.147 lockout/tagout procedures—de-energize, lock, and verify zero energy. Forcing outputs in software while machinery is connected can cause unexpected motion; confirm the trainer's actuators are in a safe state before using the force function.

Connecting Memory to the IEC 61131-3 Standard

IEC 61131-3 defines PLC programming languages and a common variable model. Inputs are prefixed `%I`, outputs `%Q`, and memory variables `%M`. Understanding the memory map behind these prefixes lets you read programs written for any compliant PLC—Allen-Bradley, Siemens, Mitsubishi, or others—with the same foundation you build today.

Key terms8

BitThe smallest unit of PLC data, having a value of either 0 (OFF) or 1 (ON).
WordA 16-bit (two-byte) group of binary data; the basic addressable unit in many older word-addressed PLCs such as the SLC 500.
Input Image TableA region of PLC memory that holds a snapshot of all physical input states, refreshed at the start of every scan cycle.
Output Image TableA region of PLC memory where the CPU writes the results of logic solving; values are transferred to physical outputs at the end of the scan.
HexadecimalBase-16 number system using digits 0–9 and letters A–F; each digit represents four binary bits (one nibble), making it a compact shorthand for binary data.
BCD (Binary-Coded Decimal)An encoding scheme where each decimal digit is represented by its own four-bit binary group; common in legacy thumb-wheel switches and displays.
REAL (Floating-Point)A 32-bit IEEE 754 data type used in PLCs to store numbers with decimal fractions, such as scaled analog process values.
Internal Bit (Memory Bit)A PLC bit that is not tied to a physical I/O terminal; used to store intermediate logic states, flags, and interlock conditions within a program.

Worked examples4

1. Convert binary 1011 0110 to decimal.
  1. Write out the place values for each bit position (bit 7 through bit 0): 128, 64, 32, 16, 8, 4, 2, 1.
  2. Identify which bits are 1: bit 7 (128), bit 5 (32), bit 4 (16), bit 2 (4), bit 1 (2).
  3. Add the place values: 128 + 32 + 16 + 4 + 2 = 182.
Answer: 182 decimal
2. Convert hexadecimal 0x3F to binary and then to decimal.
  1. Expand each hex digit to four bits: 3 = 0011, F = 1111.
  2. Combine: 0011 1111 (binary).
  3. Convert binary to decimal using place values: 32 + 16 + 8 + 4 + 2 + 1 = 63.
Answer: Binary: 0011 1111 | Decimal: 63
3. Encode decimal 59 as BCD.
  1. Separate the decimal digits: tens digit = 5, units digit = 9.
  2. Convert each digit to a four-bit binary group: 5 = 0101, 9 = 1001.
  3. Combine the two groups: 0101 1001 (BCD).
Answer: BCD: 0101 1001
4. In an SLC 500, a two-slot I/O chassis has an input module in slot 2. What is the full octal bit address for the sixth input on that module (counting from 0)?
  1. SLC 500 input addressing format: I : [slot] / [bit], where the bit number is octal.
  2. Slot number = 2.
  3. The sixth input counting from 0 is input index 5; in octal, 5 is simply 5 (octal and decimal are the same for single digits 0–7).
  4. Combine: I:2/05.
Answer: I:2/05
In class: Timed conversion drill: students complete a worksheet of 20 conversions (binary↔decimal, hex↔decimal, BCD) and self-score; any score below 80% triggers a second attempt with a different worksheet. · Instructor demonstration: use the PLC programming software (Studio 5000 or TIA Portal) to open the tag database and show input image bits toggling in real time as switches on the trainer are operated; students record the memory addresses observed. · Memory mapping exercise: given a word-addressed PLC (e.g., SLC 500 style), students complete a table assigning 12 I/O points to the correct file numbers, slot numbers, and bit addresses, then verify against an answer key.
Materials: Conversion worksheet sets, PLC programming software (Studio 5000 Logix Designer or Siemens TIA Portal, licensed lab copies), PLC trainer with switches, instructor-prepared memory mapping exercise, projector
Check: Conversion worksheet score of 80% or better (second attempt allowed); memory mapping table correct for at least 10 of 12 addresses before proceeding to Lesson 3.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

PMMI Mechatronics – Programmable Logic Controllers
1. What is the decimal value of the binary number 1010 0011?
PMMI Mechatronics – Programmable Logic Controllers
2. Which number system uses the digits 0–7 and is historically used by Allen-Bradley SLC 500 PLCs to address I/O slot positions and bit numbers?
Siemens SMSCP L1 – Digital Fundamentals and PLCs
3. A PLC scan cycle reads physical switch states and copies them to a specific memory region before executing logic. What is this memory region called?
PMMI Mechatronics – Programmable Logic Controllers
4. A scaled 4–20 mA tank-level signal has been converted and stored in PLC memory. Which data type is most appropriate for holding this value, which may include a decimal fraction such as 47.3 inches?
PMMI Mechatronics – Programmable Logic Controllers
5. Convert hexadecimal 0xAC to decimal.
Siemens SMSCP L1 – Digital Fundamentals and PLCs
6. Which IEC 61131-3 memory prefix designates a physical output variable?
FANUC CERT / General Safety
7. Before an instructor connects a new I/O module to a live PLC trainer, which OSHA standard must be followed to control hazardous energy?
PMMI Mechatronics – Programmable Logic Controllers
8. What is the BCD encoding for decimal 72?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.