a10 ECE8473xxxxx..... EC E8 47 3? ?? ..... h[0] == 0xEC h[1] == 0xE8 h[2] == 0x47 (h[3] & 0xF0) == 0x30 or: (h[3] >> 4) == 0x3 or: h[3] == 0x30 || h[3] == 0x31 || ... || h[3] == 0x3F or: h[3] >= 0x30 && h[3] <= 0x3F --- logic values: 0 is false, non-zero is true if( 1.9) ... true !3.79 -> 0 !0 -> 1 --- $ GCC -O2 -o p1 pthread.c -pthread $ GCC -O2 -o p4 pthread2.c -pthread $ lscpu | grep '^CPU(s)' CPU(s): 1 $ time ./p1 main got: hi from f main got: f x 03a0f637 ans abcdef real 0m6.643s user 0m6.635s sys 0m0.000s $ time ./p4 main got: f 1 1073741824 2147483647 main got: f 2 2147483648 3221225471 main got: f 3 3221225472 4294967295 main got: f 0 0 1073741823 main got: f x 40836e91 ans abcdef real 0m3.414s user 0m3.408s sys 0m0.000s $ --- Using inverse of FNV prime to run hash in reverse: $ python3 >>> p=16777619 # FNV prime >>> n=1<<32 # modulus >>> t=1<<31 # totient >>> pow(p,t,n) # Euler 1 >>> pi=pow(p,t-1,n) # p inverse, MOD n >>> pi 899433627 >>> (p*pi)%n 1 >>> mask=0xffffffff # (x AND mask) same as (x MOD n) >>> (p*pi)&mask 1 >>> init=2166136261 # FNV offset basis >>> data=123456 # random data >>> h=((init^data)*p) & mask # hash >>> h 3329211999 >>> ((h*pi)^data) & mask # reverse hash, back to init 2166136261 >>>