TwinCAT 3: Type Conversion and the two’s complement (Part 14)

In video number 13 we already talked about the basics of data type conversion in TwinCAT 3. We recommend you to watch this video first if you are interested in the topic. In the first video we showed you how unsigned data types can be converted. In this video we show you what happens when unsigned data types are to be converted to signed data types and vice versa.

We also explain how it happens that a positive value becomes a negative value during a type conversion. And to make you understand this, we'll talk about the two's complement and show you how it works.


00:00 Intro
00:17 Example 1: Conversion of signed integer data types
02:00 Change of sign/ two’s complement
03:59 Example 2: Conversion of signed integer data types
04:26 Outro

← Part 13

Table of Contents

Part 15 →