Talk:Find first and last set bit of a long integer: Difference between revisions
Content added Content deleted
Line 8: | Line 8: | ||
:Hrm, if it's not in two's compliment, what motivates you to find ''bits'' in it to begin with? --[[User:Ledrug|Ledrug]] 04:49, 8 December 2011 (UTC) |
:Hrm, if it's not in two's compliment, what motivates you to find ''bits'' in it to begin with? --[[User:Ledrug|Ledrug]] 04:49, 8 December 2011 (UTC) |
||
Wikipedia has a few non-Two's complement ideas: |
|||
* [[wp:Mask_(computing)#Uses_of_bitmasks|Mask_(computing)#Uses_of_bitmasks]] |
|||
* [[wp:Bit_field#Examples|Bit_field#Examples]] |
|||
* [[wp:Affinity_mask|Affinity_mask]] |
|||
* [[wp:Hash_table#In_programming_languages|Hash_table#In_programming_languages]] |
|||
* [[wp:Bitwise_operation#Applications|Bitwise_operation#Applications]] |
|||
* [[wp:umask|umask]] |
|||
* and probably a couple of others... |
|||
Sometimes it is just done for fun: |
|||
* [http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog Find the log base 2 of an N-bit integer in O(lg(N)) operations] |
|||
[[User:NevilleDNZ|NevilleDNZ]] 05:52, 8 December 2011 (UTC) |
|||
===Clarification=== |
===Clarification=== |