392

Chapter 28 Bit Search
5.Operation
5.3 Changing Position Detection
(1) Bit position from MSB
(2) Written data (Detection starts once data is written.)
(3) Detects the changing position by scanning from MSB.
(4) Detected bit position
(5) Detection result
A value of ‘32’ is returned as detection result if changing position does not exist.
A value of ‘0’ is not returned as detection result for changing position detection.
• Execution example
Write data Read value (Decimal notation)
00100000000000000000000000000000B (20000000H)Æ 2
00000001001000110100010101100111B (01234567H)Æ 7
00000000000000111111111111111111B (0003FFFFH)Æ 14
00000000000000000000000000000001B (00000001H)Æ 31
00000000000000000000000000000000B (00000000H)Æ 32
11111111111111111111000000000000B (FFFFF000H)Æ 20
11111000010010011110000010101010B (F849E0AAH)Æ 5
10000000000000101010101010101010B (8002AAAAH)Æ 1
11111111111111111111111111111111B (FFFFFFFFH)Æ 32

Table 5-1 The Relationship Between the Bit Position and the Value to be Returned (Decimal Notation)

Detected
bit position Return
value Detected
bit position Return
value Detected
bit position Return value Detected
bit position Return value
31 0 23 8 15 16 7 24
30 1 22 9 14 17 6 25
292211013 18 5 26
283201112 19 4 27
274191211 20 3 28
265181310 21 2 29
25617149 22 1 30
24716158 23 0 31
Nonexistent 32

11111111111 11 11 1 2

0123456789 AB CDEF012 3456789AB CDEF 0

0000000000 00 0 00 1110000 00000 00 00 0

>>>>>>>>>>>>>>>*

FH(15Decimal)

Data

Bit position from MSB

Scan

Detection result