16-Bit INT & 32-Bit DINT•Studio 5000 & RSLogix 500 Ready

Masked Move Calculator

Simulate PLC Masked Move (MVM) instructions bit-by-bit. Test hex masks (0F0Fh / 16#00FF), verify which Destination bits pass vs. hold prior state, and copy ready-to-use Structured Text code.

PLC Scenarios:

MVM Instruction Operands

Accepts Hex (0F0Fh, 16#0F0F), Binary (2#1010), or Decimal (10#255).

Signed: -23101 · Bin: 1010_0101_1100_0011
8 Passed · 8 Held
Unmasked (0) bits retain these values
Post-Scan Output

Destination (After MVM)

5 Bits Updated
Studio 5000 Hex Literal
16#1533
2#0001_0101_0011_0011
RSLogix 500 Hex
1533h
Signed INT
5427
Unsigned Decimal
5427
Mask Summary
8 Pass / 8 Hold
Structured Text (IEC 61131-3)
// Studio 5000 Structured Text Equivalent (16-Bit INT)
Dest_Tag := (Source_Tag AND 16#0F0F) OR (Dest_Tag AND (NOT 16#0F0F));
// Result: Dest_Tag = 16#1533 (Signed: 5427)

Interactive Bit-Level MVM Visualizer (Click Any Bit to Toggle 0 ↔ 1)

Green (Mask = 1) passes the Source bit through; Amber (Mask = 0) blocks Source and holds the Destination's prior bit.

MVM [Source: A5C3h (-23101)] [Mask: 0F0Fh] → [Dest: 1230h ⇒ 1533h (5427)]
16-Bit INT Register (Bits 15 → 0)
Register1514131211109876543210
Source
Mask
Dest (Prior)
Dest (After)
0
HOLD
0
HOLD
0
HOLD
1
HOLD
0
PASS
1
PASS
0
PASS
1
PASS
0
HOLD
0
HOLD
1
HOLD
1
HOLD
0
PASS
0
PASS
1
PASS
1
PASS
12 Free Browser-Based Engineering Utilities

Complete PLC & Industrial Automation Calculator Suite

Step-by-Step Guide

How the PLC Masked Move Instruction Works

01

Set Source & Word Width

Select 16-Bit INT (RSLogix 500 / MicroLogix) or 32-Bit DINT (Studio 5000 ControlLogix) and enter your Source word in hex, binary, or decimal.

02

Apply Your Hex Bit Mask

Enter a mask like 0F0Fh or click individual bits in the matrix. Bits set to 1 act as open gates; bits set to 0 block incoming data.

03

Verify Retained Destination Bits

Enter the Destination tag's prior value before the rung executes to confirm unrelated output coils or status flags remain untouched.

Boolean Logic & Truth Table

MVM Bitwise Formula Explained

Boolean Equation

Dest_After = (Source & Mask) | (Dest_Prior & ~Mask)

Beginners often confuse MVM with a bitwise AND. While Dest := Source AND Mask clears every unmasked bit to zero, MVM ORs the masked source with Dest_Prior AND (NOT Mask). That makes MVM essential when writing a 4-bit BCD digit or 8-bit status byte into a shared 16-bit output word without shutting off active solenoids or motors on neighboring bits.

MVM Bit-Level Truth Table

Mask BitSource BitDest (Prior)Dest (After)Action
00 or 100Hold Prior (0)
00 or 111Hold Prior (1)
100 or 10Pass Source (0)
110 or 11Pass Source (1)
PLC Programming FAQ

Frequently Asked Questions

What does the Masked Move (MVM) instruction do in a PLC?+

The Masked Move (MVM) instruction copies data from a Source register to a Destination register through a bitwise Mask. Wherever a Mask bit is 1, the corresponding Source bit overwrites the Destination bit. Wherever a Mask bit is 0, the Destination bit retains its existing value prior to the instruction.

How is Masked Move (MVM) different from a bitwise AND instruction?+

A bitwise AND instruction forces all unmasked (0) positions in the Destination register to become 0. In contrast, Masked Move (MVM) preserves the previous state of unmasked bits in the Destination register using the logic: Dest_After = (Source & Mask) | (Dest_Before & ~Mask). This prevents accidentally turning off unrelated outputs sharing the same 16-bit output card.

How do I format hexadecimal masks in Studio 5000 vs. RSLogix 500?+

In Allen-Bradley Studio 5000 Logix Designer (ControlLogix / CompactLogix), hexadecimal constants use the 16# prefix, such as 16#0F0F or 16#00FF_00FF. In legacy RSLogix 500 (SLC 500 / MicroLogix), hexadecimal masks use a trailing h suffix (such as 0F0Fh), and masks beginning with A–F require a leading zero (e.g., 0FF00h).

Does MVM use 16-bit INT or 32-bit DINT data types?+

RSLogix 500 operates primarily on 16-bit signed integers (INT, bits 0–15). Studio 5000 natively executes on 32-bit signed double integers (DINT, bits 0–31) as well as SINT (8-bit) and INT (16-bit) tags. Make sure Source, Mask, and Destination share matching data types to avoid implicit sign-extension.

Why does my PLC show a negative decimal number after a Masked Move?+

PLC INT (16-bit) and DINT (32-bit) registers use signed two’s complement representation. If the Most Significant Bit (Bit 15 for INT, or Bit 31 for DINT) is 1 after the Masked Move completes, the PLC displays the decimal value as negative even though the underlying bit pattern is exact.

Are my register values stored on a server?+

No. All bitwise calculations execute 100% locally in your web browser. Your latest register values are cached in browser localStorage for convenience, and shareable links encode the hex values directly in URL query parameters.