Hex representation of a Boolean function

821 Views Asked by At

How can I represent a Boolean function in hex notation or vice versa. For example if a Boolean function is represented as "$f43bd738b0b6808d$" in hex, what will be the function in $POS$ or $SOP$ form?

1

There are 1 best solutions below

0
On

There's no standard way to convert numbers or strings over the hexadecimal digits to Boolean formulas. My best guess is the following: your string has 16 hex digits, perhaps meaning it is drawn from a set of $16^{16}$ strings. That is $2^{4 \times 16} = 2^{2^6}$ strings, which are enough to encode all logical formulas with six variables. Thus, you could write out your number in binary (which is the same as writing each hex digit in binary separately), so that it has $64 = 2^6$ bits, and then the first digit corresponds to the assignment $(0,0,0,0,0,0)$ to the variables, the second digit to $(0,0,0,0,0,1)$, the third to $(0,0,0,0,1,0)$, and so on. Then you can build a DNF from the truth table.