Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 100111 AND 1001 = 0
- Shift-right 1
- 010011 AND 1001 = 0
- Shift-right 1
- 001001 AND 1001 = 1 // Pattern FOUND!
- 100111 AND 001001 = 000001
- x = 100111
- if (x AND 1001 == 1001)
- print "found"
- if ((TestPattern & SearchPattern) == SearchPattern)
- {
- // then match
- }
- if ((InputPattern AND SearchMask) == SearchPattern)
- {
- // then match
- }
Add Comment
Please, Sign In to add comment