Guest User

Untitled

a guest
Jun 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. 100111 AND 1001 = 0
  2. Shift-right 1
  3. 010011 AND 1001 = 0
  4. Shift-right 1
  5. 001001 AND 1001 = 1 // Pattern FOUND!
  6.  
  7. 100111 AND 001001 = 000001
  8.  
  9. x = 100111
  10. if (x AND 1001 == 1001)
  11. print "found"
  12.  
  13. if ((TestPattern & SearchPattern) == SearchPattern)
  14. {
  15. // then match
  16. }
  17.  
  18. if ((InputPattern AND SearchMask) == SearchPattern)
  19. {
  20. // then match
  21. }
Add Comment
Please, Sign In to add comment