Skip to content
Advertisement

Tag: binary

Binary to Decimal 32bit signed with PHP

I currently have a Decimal that is coming through as: 4294960896 This is then converted to Binary with this function: Which equals: 11111111111111111110011100000000 I then need to take that binary and convert it to the 32bit signed version which should be ‘-6400’ I can’t seem to find any built in functions that support 32bit signed output. Answer The hexadecimal representation

Compare and trim binary/unicoded string to normal string?

I am using below mysql query to check which records vary from the trimmed value Above query returns binary value and trimmed value as shown below. Result of mysql query: Highlighted values in above image show that binary value vary from trimmed value. I tried below 2 things: calculating length of both binary and trimmed column but it is same

Advertisement