EasyManuals Logo

Mitsubishi FX1N Series Programming Manual

Mitsubishi FX1N Series
466 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #114 background imageLoading...
Page #114 background image
FX Series Programmable Controllers Devices in Detail 4
4-42
4.14.4 Two’s Compliment
Programmable controllers, computers etc, use a format called 2s compliment. This is a
mathematical procedure which is more suited to the micro processors operational hardware
requirements. It is used to represent negative numbers and to perform subtraction operations.
The procedure is very simple, in the following example 15 - 7 is going to be solved:
Step1: Find the binary values (this example uses 8 bits)
15 = 00001111
7 = 00000111
Step2: Find the inversion of the value to be subtracted.
Procedure: invert all 1ísto0ís and all 0ísto1s.
7 = 00000111
Inverted 7 = 11111000
Step3: Add 1 to the inverted number.
Procedure: add 1 to the right hand most bit. Remember this is binary addition hence, when a
value of 2 is obtained 1 is moved in to the next left hand position and the remainder is set to 0
(zero);
Inverted7 11111000
Additional1
00000001
Answer
11111001
This result is actually the same as the negative value for 7 i.e. -7.
Step4: Add the answer to the number the subtraction is being made from (i.e. 15).
Procedure: Remember 1+1 = 0 carry 1 in base 2 (binary).
Original value15 00001111
Answer found in step3
11111001
Solution (1)00001000
The (1) is a carried 1 and is ignored as this example is only dealing with 8 bits.
Step 5: Convert the answer back.
00001000 = 8
The answer is positive because the MSB (the most left hand bit) is a 0 (zero). If a quick mental
check is made of the problem it is indeed found that 15-7 = 8.
In fact no subtraction has taken place. Each of the steps has either converted some data or
performed an addition. Yet the answer is correct 15 - 7 is 8. This example calculation was
based on 8 bit numbers but it will work equally well on any other quantity of bits.

Table of Contents

Other manuals for Mitsubishi FX1N Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi FX1N Series and is the answer not in the manual?

Mitsubishi FX1N Series Specifications

General IconGeneral
Programming LanguageLadder Logic
Output TypeRelay, Transistor
Operating Temperature0 to 55°C
Power Supply100-240V AC or 24V DC
Program Capacity8K steps
Communication PortsRS-422
Data Memory8000 words
High-speed CountersUp to 6 channels
Expansion ModulesAvailable
Pulse Output2 points

Related product manuals