On 9/3/19 10:24 PM, yary wrote:
b vs B changes the order to show the bits within each byte
h vs H changes the order to show the nybbles within each byte
I'm not so good at explaining, and I remember you saying you're not so
good with docs such as https://en.wikipedia.org/wiki/Endianness - so
I
b vs B changes the order to show the bits within each byte
h vs H changes the order to show the nybbles within each byte
I'm not so good at explaining, and I remember you saying you're not so good
with docs such as https://en.wikipedia.org/wiki/Endianness - so I'll give
you some more pack/unpack e
On 9/3/19 5:52 PM, yary wrote:
I'm puzzled what you really want, what the end goal is.
For looking at different representations of the same item, "pack" and
"unpack" are useful. I've only used the perl5 versions of those, for p6
it is "experimental". Different machines will represent the same
I'm puzzled what you really want, what the end goal is.
For looking at different representations of the same item, "pack" and
"unpack" are useful. I've only used the perl5 versions of those, for p6 it
is "experimental". Different machines will represent the same real
differently, and if I recall c
Hi Fernando,
Not sure how to do the blob thing, but it sound like what
I am after
What I want to do is to assign a value to a 32 bit real variable,
then see what ones and zeros are in the variable.
Is it possible to represent a real number as both a 32 bit
integer and a 32 bit real number and t
I guess you're reading data from a file, since Perl 6 numbers (such as
11.01) might have a Rat representation.
If so I guess you have that data in a Blob, then read the four bytes using
read-uint8 (https://docs.perl6.org/routine/read-uint8) and apply .base(2)
to each of them.
On Tue, Sep 3, 2019 a
On 9/3/19 5:21 AM, ToddAndMargo via perl6-users wrote:
On Tue, Sep 3, 2019 at 1:15 PM ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
Hi All,
How would I print out what a 32 real value of
11.01 (base 10) looks like in its raw
binary form (ones and zeros)?
On Tue, Sep 3, 2019 at 1:15 PM ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
Hi All,
How would I print out what a 32 real value of
11.01 (base 10) looks like in its raw
binary form (ones and zeros)?
Many thanks,
-T
On 9/3/19 5:09 AM, Fernando Santa
Is this what you need?
> (11.01).base(2)
1011.0011
On Tue, Sep 3, 2019 at 1:15 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> Hi All,
>
> How would I print out what a 32 real value of
> 11.01 (base 10) looks like in its raw
> binary form (ones and zeros)?
>
> Many thanks,
>
Hi All,
How would I print out what a 32 real value of
11.01 (base 10) looks like in its raw
binary form (ones and zeros)?
Many thanks,
-T
10 matches
Mail list logo