hiphopvorti.blogg.se

Double word vs word
Double word vs word









double word vs word

Same when it comes to Integers if you have a small Integer and any maths you do on it will result in a small Integer then use a Byte or Word size of storage. If you were asked to move two gallons of water would you choose to use a 5 gallon bucket or a 60 gallon drum, the bucket is more appropriate because that is the best fit. Real numbers always use a Double Word so for them you have no choice but Integers can use any one of the three, and it is all about size.

double word vs word

So use Real where you need to but use Integer wherever you can. If you now multiply 0.33333 by 3 you get 0.99999 which is nearly the 1 we started with, but not quiet, it is an inaccurate 1. But that isn't the true value, you would have to have an infinite number of 3s to truly represent 1/3. Also Real numbers are less accurate than Integer ones, for instance get your calculator and divide 1 by 3 and you get 0.33333 (may be more or less 3s depending on the screen size). But Real numbers always need the storage space of a Double Word and Real calculations usually take longer than Integer ones. It can be tempting to use Real numbers all the time because it can be any value you want with or without numbers after the decimal point. Real or Float numbers do have a decimal point and so can be numbers like 3.142.īit, Byte, Word, and Double Word are the things that you store the numbers in.Ī Byte will store a small Integer number.Ī Word will store a larger Integer number.Ī Double Word will store either a Real number or a large Integer number. Integer numbers don't have a decimal point and so can only be whole numbers. Click on Dec and it will convert that value to Decimal.Following corrections from others and more questions I have edited my original reply.īinary, Integer and Real are the types of number that you will normally use in a PLC.īinary can only have two values 0 or 1, Off or On. Click on Bin and then enter a value of 16 1s.

#Double word vs word windows#

If you want to see where these numbers come from the start calculator in Windows and choose scientific from the View menu. This totally depends on your PLC and how many bits it uses in its calculations but listed below are the current norms for 16 bit system: What vaules can a Word and Double Word hold But generally stick to the rule and you won't go wrong. There are exceptions to this rule, if most of the time a Word length will be OK but occasionally you need Double Word then you can convert from Word to Double and back again. If you have a large Integer or any maths you do will result in a large Integer then use a Double Word size.

double word vs word

Same when it comes to Integers if you have a small Integer and any maths you do on it will result in a small Integer then use a Word size of storage. Real numbers always use a Double Word so for them you have no choice but Integers can use either, and it is all about size. Also Real numbers are less accurate than Integer ones because of rounding, for instance get your calculator and divide 1 by 3 and you get 0.33333 (may be more or less 3s depending on the screen size). It can be tempting to use Real numbers all the time because it be any value you want with or without numbers after the decimal point. Real or Float numbers do have a decimal point and so can be numbers like 3.142.īit, Word, and Double Word are the things that you store the numbers in.Ī word will store a small Integer number.Ī Double Word will store either a Real number or a large Integer number. Binary, Integer and Real are the types of number that you will normally use in a PLC.īinary can only have two values 0 or 1, Off or On.











Double word vs word