in reply to Re^60: Interleaving bytes in a string quickly
in thread Interleaving bytes in a string quickly

Wikipedia says: The byte ... is an ordered collection of bits, in which each bit denotes the binary value of 1 or 0. The size of a byte is typically hardware dependent, but the modern de facto standard is 8 bits, as this is a convenient power of 2.

I am referring to an ordered collection of 8 bits.

And an 8 bit byte can vaiously contain unsigned integers 0-255, or signed integers -127-127, or 8 discrete boolean values.

Or 8 bits of a stream of HDMI information, as is the case here.

Thanks for the quotes. They said it much better than I did. You're trying to tell me that a byte of HDMI info on disk is suddenly not a byte of HDMI info if I place it in a Perl var, and that doesn't fly.

  • Comment on Re^61: Interleaving bytes in a string quickly

Replies are listed 'Best First'.
Re^62: Interleaving bytes in a string quickly
by Anonymous Monk on Mar 04, 2010 at 17:33 UTC

    I am referring to an ordered collection of 8 bits.

    No you weren't. How can an ordered collection of 8-bits be "just stored differently"?

    $_ = "\x80\x81"; # Value is bytes 80 81 utf8::upgrade($_); # Value is still bytes 80 81, # just stored differently.

      Bits 1-0-0-0-0-0-0-0-1-0-0-0-0-0-0-1. How many examples do you want? Here are three for the first byte:

      $byte = 0x80; $byte = "\x80"; @byte = (1,0,0,0,0,0,0,0);

      (They respectively take 16, 36 and 128 bytes to store that one byte.)

        128 bytes to store ... one byte Que?

        Calling a bull a cow, doesn't make it a cow.

        Nor make it's product any more palatable