Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 861 of 909
Binary Data
The SmartMotor language allows the programmer to access data at the binary level.
Understanding binary data is useful when programming the SmartMotor or any electronic
device. The following is an explanation of how binary data works.
All digital computer data is stored as binary information. A binary element is one that has only
two states, commonly described as "on" and "off" or "one" and "zero." A light switch is a
binary element. It can either be "on" or "off." A computer’s memory is nothing but a vast
array of binary switches called "bits".
The power of a computer comes from the speed and sophistication with which it manipulates
these bits to accomplish higher tasks. The first step towards these higher goals is to organize
these bits in such a way that they can describe things more complicated than "off" or "on."
Different quantities of bits are used to make up the building blocks of data. They are most
commonly described as follows:
Four bits = Nibble
Eight bits =
Byte
Sixteen bits = Word
Thirty two bits =
Long
One bit has two possible states, on or off. Every time a bit is added, the possible number of
states is doubled. Two bits have four possible states. They are as follows:
00
off-off
01 off-on
10 on-off
11 on-on
A nibble has 16 possible states. A byte has 256, a word has 65536 and a long has billions of
possible combinations.
Because a byte of information has 256 possible states, it can reflect a number from zero to
255. This is done by assigning each bit a value of twice the one before it, starting with one.
Each bit value becomes as follows:
Bit
Value
0 1
1 2
2 4
3 8
4 16
5 32
6 64
7 128
Appendix: Binary Data