Understanding Bit Settings - Keithley 2450 Reference Manual

Interactive sourcemeter instrument
Table of Contents

Advertisement

Model 2450 Interactive SourceMeter® Instrument Reference Manual

Understanding bit settings

When you write to or read a status register, you can use binary, decimal, or hexadecimal values to
represent the binary values of the bit states. When the value is converted to its binary equivalent, you
can determine which bits are set on or clear. Zero (0) indicates that all bits are clear.
In the Model 2450, the least significant bit is always bit B0. The most significant bit differs for each
register, but in most cases is either bit B7 or bit B15.
Bit position
Binary value
Decimal value
Weight
Bit position
Binary value
Decimal value
Weight
For example, if a value of 1.29000e+02 (which is 129) is read as the value of the condition register,
the binary equivalent is 0000 0000 1000 0001. This value indicates that bit B0 and bit B7 are set and
all other bits are cleared.
For example, if you read a value of 1.22880e+04 (12,288) for the condition register, the binary
equivalent is 0011 0000 0000 0000. This value indicates that bits B12 and B13 are set.
B15
32768
0
When bit B12 (4096) and bit B13 (8192) are set (1), the decimal equivalent is 4096 + 8192 = 12,288.
2450-901-01 Rev. B/September 2013
B7
B6
1000
0100
0000
0000
128
64
7
6
2
2
B15
B14
1000
0100
0000
0000
0000
0000
0000
0000
32768
16384
15
14
2
2
B14
B13
B12
B11
16384 8192 4096 2048 1024 512 256 128
0
1
1
0
B5
B4
B3
0010
0001
1000
0000
0000
32
16
5
4
2
2
2
B13
B12
B11
0010
0001
1000
0000
0000
0000
0000
0000
0000
0000
0000
8192
4096
2048
13
12
2
2
2
B10
B9
B8
B7
B6
64
0
0
0
0
0
Appendix C: Status model
B2
B1
0100
0010
8
4
2
3
2
1
2
2
B10
B9
0100
0010
0000
0000
0000
0000
1024
512
11
10
9
2
2
B5
B4
B3
B2
32
16
8
4
0
0
0
0
B0
0000
1
0
2
B8
0001
0000
0000
256
8
2
B1
B0
2
1
0
0
C-15

Advertisement

Table of Contents
loading

Table of Contents