binaryN - n
- nBits
Creates a binary pattern from a number, padded to n bits long.
"hh".s().struct(binaryN(55532, 16))
// "hh".s().struct("1 1 0 1 1 0 0 0 1 1 1 0 1 1 0 0") | parameter | type |
|---|---|
| n |
|
| input number to convert to binary | |
| nBits |
|
| pattern length, defaults to 16 | |