Bits, Bytes And Words; Number Systems - Mitsubishi Electric FX2N Beginners Manual

Hide thumbs Also See for FX2N:
Table of Contents

Advertisement

Bits, Bytes and Words

3.2
Bits, Bytes and Words
As in all digital technology, the smallest unit of information in a PLC is a "bit". A bit can only have
two states: "0" (OFF or FALSE) and "1" (ON or TRUE). PLCs have a number of so-called bit
devices that can only have two states, including inputs, outputs and relays.
The next larger information units are the "byte", which consists of 8 bits, and the "word", which
consists of two bytes. In the PLCs of the MELSEC FX families the data registers are "word
devices", which means that they can store 16-bit values.
Since a data register is 16 bits wide it can store signed values between -32,768 and +32,767
(see Chapter 3.3). When larger values need to be stored two words are combined to form a
32-bit long word, which can store signed values between -2,147,483,648 and +2,147,483,647.
Counters make use of this capability, for example.
3.3

Number Systems

The PLCs of the MELSEC FX family use several different number systems for inputting and
displaying values and for specifying device addresses.
Decimal numbers
The decimal number system is the system we use most commonly in everyday life. It is a "posi-
tional base 10" system, in which each digit (position) in a numeral is ten times the value of the
digit to its right. After the count reaches 9 in each position the count in the current position is
returned to 0 and the next position is incremented by 1 to indicate the next decade (9 à 10, 99
à 100, 199 à 1,000 etc).
Base: 10
Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
In the MELSEC FX family of PLCs decimal numbers are used for entering constants and the
setpoint values for timers and counters. Device addresses are also entered in decimal format,
with the exception of the addresses of inputs and outputs.
Binary numbers
Like all computers a PLC can only really distinguish between two states, ON/OFF or 0/1. These
"binary states" are stored in individual bits. When numbers need to be entered or displayed in
other formats the programming software automatically converts the binary numbers into the
other number systems.
Base: 2
Digits: 0 and 1
3 – 2
Bit 15
0
0
0
0
0
0
1 Byte
An Introduction to Programming
0
0
0
0
0
0
1 Byte
1 Word
Bit 0
0
0
0
0
MITSUBISHI ELECTRIC

Advertisement

Table of Contents
loading

Table of Contents