2

I was reading this very useful explanation of what an OP_RETURN transaction looks like and got tripped up by part of it.

        "hex" : "6a13636861726c6579206c6f766573206865696469"

This first byte it followed by a byte which represents the length of the rest of the bytes in the scriptPubKey. In this case we see the hex value Ox13, which means there are 19 more bytes.

But there are 38 bytes following the hex value 0x13. Why the discrepency? I'm pretty sure I'm missing something obvious and I'd have asked in a comment on the answer itself but I haven't enough rep points. Thanks in advance.

1 Answer 1

2

I found the answer on Wikipedia:

One hexadecimal digit represents a nibble, which is half of an octet or byte (8 bits)

So two hex digits per byte. And a "nibble" for half a byte. I like that. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.