Re: not_bits() not_working()

new topic     » goto parent     » topic index » view thread      » older message » newer message

Al Getz wrote:
 
> atom a,x
> a=2
>
> x=not_bits(a)
>
> --now x equals -3, which isnt correct.


It is correct! look at this (or try it yourself):
---------------------------------------------------
printf(1,"%08x\n", 2 )			-- 00000002
printf(1,"%08x\n", not_bits(2) )	-- FFFFFFFD
---------------------------------------------------

Please notice also:

0000 0000 0000 0000 0000 0000 0000 0010 =  2 = #00000002
1111 1111 1111 1111 1111 1111 1111 1101 = -3 = #FFFFFFFD

Have a nice day, Rolf

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu