-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kwxm/plc spec/bitwise conversions #5911
Conversation
Are the subscripts LE and BE spelt out somewhere? |
|
||
\noindent Now assume that none of the conditions above hold, so $0 < n < 2^{65536}$ and | ||
$0 \leq w \leq 8192$. Since $n>0$ we can write | ||
$n = \sum_{i=0}^{N-1}a_{i}256^i$ with $N \geq 1$ and $a_{N-1} \ne 0$. We then have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, maybe it's a stupid question, but I don't understand why we can write n
as that sum. Can you provide some more explanations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's a base-256 expansion: I'll try to explain that a bit more clearly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot to say that the a_i are supposed to lie between 0 and 255. I've fixed that now.
I just had to introduce those because there wasn't room to get the full definition into the table. I think I assumed it would be obvious what they stood for given the discussion of endianness, but it wouldn't do any harm to stick in a comment saying "(hence the subscripts LE and BE)" or something. |
[PLT-8189] This adds the two new integer/bytestring conversions to the specification. See p35-36 of the attached PDF for a readable version.
plutus-core-specification.pdf