I am trying to print a 32bits register within GDB using the command:
define gpioa_moder
print /t *(uint32_t*)0x48000000
end
This is what I get:
101000000000000000010010100000
However, I'd like to keep the two leading zeros missing like this:
00101000000000000000010010100000
Thanks
A leading zero is any 0 digit that comes before the first nonzero digit in a number's binary form.
Leading zeros in a binary number is equal to zeros preceding the highest order set bit of the number.
COUNTIF with leading zeros Here the COUNTIF function is set up to count values in B4:B8 that are equal to "01".
You may want to try the x
(examine) command.
Then use it like this:
x /w 0x48000000
---> 0x48000000: 00101000000000000000010010100000
You can even use the other format parameters b
, h
and g
to print different sizes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With