Omron FH Series User Manual page 43

Vision sensor
Hide thumbs Also See for FH Series:
Table of Contents

Advertisement

Term
2's complement
FH/FHV Series Vision System User's Manual (Z365-E1)
Binary numbers are generally used to represent negative numbers.
Negative numbers are expressed by Inverting all bits of a positive number and
adding 1 to the result.
Ex. -1 is expressed as 2's complement.
-1 can be calculated by 0-1.
(In the case of 1, minus 1)
00000000 (= 0)
-)
00000001 (= 1)
11111111 (=-1)
−"1" expresses with 2's Complement (for 8 bits)
There are methods for simple calculation without performing this kind of computa-
tion.
For instance, Negative number = inverting all bits of a positive number and then
adding 1 to the result.
00000001 (= 1)
Invert all bits
11111110
Plus 1
11111111 (=-1)
The first digit is used to judge whether the number is positive or negative.
When 0: Positive number (or 0)
When 1: Negative number
The advantage of two's complement numbers is that positive and negative num-
bers can be used as is in calculations.
Ex. When -1+10=9
11111111 (= -1)
+)00001010 (= 10)
00001001 (= 9)
Definition
Terminology
41

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fhv seriesFh-2 seriesFh-3 seriesFh-5 seriesFh-l seriesFhv7 series ... Show all

Table of Contents