Introduction to Industrial Automation


Figure A.3  Conversion of a decimal number to binary



Download 43,9 Mb.
Pdf ko'rish
bet415/440
Sana01.01.2022
Hajmi43,9 Mb.
#294756
1   ...   411   412   413   414   415   416   417   418   ...   440
Bog'liq
Introduction to Industrial Automation by Stamatios Manesis, George

239

Figure A.3  Conversion of a decimal number to binary.


412

 



  Appendix A

The magnitude of a negative number represented with regard to one’s complement is the one’s 

complement of the corresponding positive number magnitude. Some examples of negative num-

bers represented in one’s complement, are shown in Figure A.5.

The two’s complement of a binary number is the sum of one’s complement plus 1, as expressed 

by Equation A.1,

 

2



1

1



s complement

s complement

=

+



 (A.1)

Binary


number

Decimal


number

Sign


Magnitude

0 1 1 1


+7

0 1 1 0


+6

0 1 0 1


+5

0 1 0 0


+4

0 0 1 1


+3

0 0 1 0


+2

0 0 0 1


+1

0 0 0 0


+0

1 0 0 1


–1

1 0 1 0


–2

1 0 1 1


–3

1 1 0 0


–4

1 1 0 1


–5

1 1 1 0


–6

1 1 1 1


–7

Figure A.4  Signed binary numbers.

Binary


number

Decimal


number

1’s complement

Sign

Magnitude



Magnitude

1

1



0 0

1

0



1 1

1

1



1 0

1

0



1 0

1

1



0 1

1

0



0 1

1

1



0 0

1

0



0 0

1

0



0 1

1

1



0 1

1

0



1 0

1

1



1 0

1

0



1 1

1

1



1 1

–1

–2



–3

–4

–5



–6

–7

Sign



Figure A.5  Representation of negative numbers using the complement of a binary number 

(one’s complement).


Appendix A 



 



413

PLCs use the two’s complement to perform subtraction of two binary numbers, which means 

that the subtraction is replaced by an additive operation, as clarified by Equation A.2,

 

(7)



10

 − (5)


10

 = (7)


10

 + (−5)


10

 = (0111)

2

 + (1011)



2

 = (0010)

2

 = (2)


10

2’s complement

 (A.2)

The subtraction operation using the two’s complement facilitates its implementation in a PLC, 



since the same digital circuit will perform both addition and subtraction.

A.4   Binary-Coded Decimal Arithmetic System (BCD)

In a binary-coded decimal arithmetic system, each digit of a decimal number is coded via a four-

digit binary number. This definition means that each digit of a decimal number is simply substi-

tuted by the corresponding binary number, as in the following example,

45

10

0100



2

0101


2

In the past, computer systems had specific units for the execution of the arithmetic operations 

between BCD numbers in order to overcome memory storage problems. In some PLCs today, the 

BCD arithmetic system is even supported since it is compatible with the operation of some output 

devices as an indication display device, or input devices as an arithmetic switch. Figure A.6 shows 

an example of converting a BCD number to an equivalent decimal number.




Download 43,9 Mb.

Do'stlaringiz bilan baham:
1   ...   411   412   413   414   415   416   417   418   ...   440




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish