Fábio Santos wrote:
>On 5 Jun 2013 06:23, "Tim Roberts" wrote:
>> A single machine word was 60 bits, so a single register read got you 10
>> characters.
>
>10 characters! Now that sounds like it's enough to actually store a word.
>However long words can inadverten be cropped.
Well, Cybers weren
On 2013-06-12, F?bio Santos wrote:
> On 5 Jun 2013 06:23, "Tim Roberts" wrote:
>> A single machine word was 60 bits, so a single register read got you 10
>> characters.
>
> 10 characters! Now that sounds like it's enough to actually store a word.
> However long words can inadverten be cropped.
O
On 5 Jun 2013 06:23, "Tim Roberts" wrote:
> A single machine word was 60 bits, so a single register read got you 10
> characters.
10 characters! Now that sounds like it's enough to actually store a word.
However long words can inadverten be cropped.
--
http://mail.python.org/mailman/listinfo/pyt
On Tue, Jun 4, 2013 at 3:49 PM, Chris Angelico wrote:
> So... can we cite http://xkcd.com/859/ in two threads at once, or does
> that create twice as much tension?
No, you just look at one of them upside-down, and then they cancel
each other out.
--
http://mail.python.org/mailman/listinfo/python
Grant Edwards wrote:
>On 2013-06-03, Dan Stromberg wrote:
>>
>> When I was a Freshman in college, I used a CDC Cyber a lot; it had 6 bit
>> bytes and 60 bit words. This was in 1985.
>
>But you couldn't address individual 6-bit "hextets" in memory could
>you? My recollection is that incrementin
On Wed, Jun 5, 2013 at 5:51 AM, Joshua Landau
wrote:
> On 4 June 2013 14:39, Grant Edwards wrote:
>> On 2013-06-03, Dan Stromberg wrote:
>>> Today though, it would be difficult to sell a conventional (Von Neumann)
>>> computer that didn't have 8 bit bytes.
>>
>> There are tons (as in millions of
On 4 June 2013 14:39, Grant Edwards wrote:
> On 2013-06-03, Dan Stromberg wrote:
>> Today though, it would be difficult to sell a conventional (Von Neumann)
>> computer that didn't have 8 bit bytes.
>
> There are tons (as in millions of units per month) of CPUs still being
> sold in the DSP marke
> From: invalid@invalid.invalid
> Subject: Re: How to get an integer from a sequence of bytes
> Date: Tue, 4 Jun 2013 13:42:46 +
> To: python-list@python.org
[...]
> VN designs are still very common in smaller CPUs (embedded stuff).
DSPs perhaps... not CPUs. Even ARMs are H
On 2013-06-03, Carlos Nepomuceno wrote:
>
>> Date: Mon, 3 Jun 2013 15:41:41 -0700
>> Subject: Re: How to get an integer from a sequence of bytes
>> From: drsali...@gmail.com
>> To: python-list@python.org
> [...]
>> Today tho
On 2013-06-03, Dan Stromberg wrote:
> On Mon, Jun 3, 2013 at 7:31 AM, Grant Edwards wrote:
>
>> That's a common assumption, but historically, a "byte" was merely the
>> smallest addressable unit of memory. The size of a "byte" on widely
>> used used CPUs ranged from 4 bits to 60 bits.
>>
>> Quoti
On Mon, Jun 3, 2013 at 4:18 PM, Carlos Nepomuceno <
carlosnepomuc...@outlook.com> wrote:
>
> > Date: Mon, 3 Jun 2013 15:41:41 -0700
> > Subject: Re: How to get an integer from a sequence of bytes
> > From: drsali...@gmail.com
>
> Date: Mon, 3 Jun 2013 15:41:41 -0700
> Subject: Re: How to get an integer from a sequence of bytes
> From: drsali...@gmail.com
> To: python-list@python.org
[...]
> Today though, it would be difficult to sell a conventional (Von
> Neum
On Mon, Jun 3, 2013 at 7:31 AM, Grant Edwards wrote:
> That's a common assumption, but historically, a "byte" was merely the
> smallest addressable unit of memory. The size of a "byte" on widely
> used used CPUs ranged from 4 bits to 60 bits.
>
> Quoting from http://en.wikipedia.org/wiki/Byte
>
>
On 2013-06-03, Dave Angel wrote:
> On 06/03/2013 10:31 AM, Grant Edwards wrote:
>> On 2013-06-03, Dennis Lee Bieber wrote:
>>> On Sun, 02 Jun 2013 21:25:45 +0200, Mok-Kong Shen
>>> declaimed the following in
>>> gmane.comp.python.general:
>>>
>>>
b'7' is the byte with the character 7 in a c
On 06/03/2013 10:31 AM, Grant Edwards wrote:
On 2013-06-03, Dennis Lee Bieber wrote:
On Sun, 02 Jun 2013 21:25:45 +0200, Mok-Kong Shen
declaimed the following in
gmane.comp.python.general:
b'7' is the byte with the character 7 in a certain code, so that's
ok. In other PLs one assigns an int
On 2013-06-03, Dennis Lee Bieber wrote:
> On Sun, 02 Jun 2013 21:25:45 +0200, Mok-Kong Shen
> declaimed the following in
> gmane.comp.python.general:
>
>
>> b'7' is the byte with the character 7 in a certain code, so that's
>> ok. In other PLs one assigns an int to a byte, with that int in either
On Mon, Jun 3, 2013 at 5:25 AM, Mok-Kong Shen wrote:
> b'7' is the byte with the character 7 in a certain code, so that's
> ok. In other PLs one assigns an int to a byte, with that int in either
> decimal notation or hexadecimal notation, or else one assigns a
> character to it, in which case it g
Am 30.05.2013 21:22, schrieb Ned Batchelder:
On 5/30/2013 2:26 PM, Mok-Kong Shen wrote:
Am 27.05.2013 17:30, schrieb Ned Batchelder:
On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
From an int one can use to_bytes to get its individual bytes,
but how can one reconstruct the int from the sequence
On 5/30/2013 2:26 PM, Mok-Kong Shen wrote:
Am 27.05.2013 17:30, schrieb Ned Batchelder:
On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
From an int one can use to_bytes to get its individual bytes,
but how can one reconstruct the int from the sequence of bytes?
The next thing in the docs after i
On 30 mai, 20:42, Ian Kelly wrote:
> On Thu, May 30, 2013 at 12:26 PM, Mok-Kong Shen
>
> wrote:
> > Am 27.05.2013 17:30, schrieb Ned Batchelder:
>
> >> On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
>
> >>> From an int one can use to_bytes to get its individual bytes,
> >>> but how can one reconstru
On Thu, May 30, 2013 at 12:26 PM, Mok-Kong Shen
wrote:
> Am 27.05.2013 17:30, schrieb Ned Batchelder:
>>
>> On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
>>>
>>> From an int one can use to_bytes to get its individual bytes,
>>> but how can one reconstruct the int from the sequence of bytes?
>>>
>> T
Am 27.05.2013 17:30, schrieb Ned Batchelder:
On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
From an int one can use to_bytes to get its individual bytes,
but how can one reconstruct the int from the sequence of bytes?
The next thing in the docs after int.to_bytes is int.from_bytes:
http://docs.py
On 2013-05-27, Mok-Kong Shen wrote:
> From an int one can use to_bytes to get its individual bytes,
> but how can one reconstruct the int from the sequence of bytes?
One way is using the struct module.
--
Grant Edwards grant.b.edwardsYow! Uh-oh!! I forgot
On 05/27/2013 08:31 PM, Steven D'Aprano wrote:
On Mon, 27 May 2013 11:30:18 -0400, Ned Batchelder wrote:
On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
From an int one can use to_bytes to get its individual bytes, but how
can one reconstruct the int from the sequence of bytes?
The next thing
> From: steve+comp.lang.pyt...@pearwood.info
> Subject: Re: How to get an integer from a sequence of bytes
> Date: Mon, 27 May 2013 15:00:39 +
> To: python-list@python.org
>
> On Mon, 27 May 2013 16:45:05 +0200, Mok-Kong Shen wrote:
&g
On Mon, 27 May 2013 11:30:18 -0400, Ned Batchelder wrote:
> On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
>> From an int one can use to_bytes to get its individual bytes, but how
>> can one reconstruct the int from the sequence of bytes?
>>
>>
> The next thing in the docs after int.to_bytes is int.f
On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
From an int one can use to_bytes to get its individual bytes,
but how can one reconstruct the int from the sequence of bytes?
The next thing in the docs after int.to_bytes is int.from_bytes:
http://docs.python.org/3.3/library/stdtypes.html#int.from_
On Mon, 27 May 2013 16:45:05 +0200, Mok-Kong Shen wrote:
> From an int one can use to_bytes to get its individual bytes, but how
> can one reconstruct the int from the sequence of bytes?
Here's one way:
py> n = 11999102937234
py> m = 0
py> for b in n.to_bytes(6, 'big'):
... m = 256*m + b
...
From an int one can use to_bytes to get its individual bytes,
but how can one reconstruct the int from the sequence of bytes?
Thanks in advance.
M. K. Shen
--
http://mail.python.org/mailman/listinfo/python-list
29 matches
Mail list logo