set off CLI tools to work with bits and bytes
This tool will take input string of hex values and print specified in the command line byte number of an input
Example:
$echo "01020304" | get_byte 1
> 0x02
This will print value of bit 1 in byte 1:
$ echo "01020304" | get_byte 1.1
> 1
get_byte.exe [OPTIONS] <byte-number>
-f, --format <format>
Format of output: bin, dec, hex [default: hex]
-h, --hex-string <hex-string>
Hex string
This tool will take input string of hex values and print specified in the command line byte number of an input
set_byte.exe [OPTIONS] <byte-number> [value]
-h, --hex-string <hex-string> Hex string
<byte-number> Byte number
<value> Value to set [default: 1]
Tool with print positions of the set bits in the provided value respectively to offset (bit counting from offset)
print_bits <hex_value> [offset]
<hex_value> Value for evaluation
[offset] offset for bit counting [default: 1]
> print_bits 0x103 1
*Bit 1 is set
*Bit 2 is set
*Bit 9 is set
cargo build