Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'anyway.': 0.05; 'widely': 0.05; '"the': 0.07; 'memory.': 0.07; 'odd': 0.07; 'referring': 0.07; 'smallest': 0.07; 'bits': 0.09; 'bytes.': 0.09; 'historically': 0.09; 'subject:How': 0.10; 'bits.': 0.16; 'merely': 0.16; 'quantum': 0.16; 'to:name:python list': 0.16; 'words.': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'dependent': 0.19; 'byte': 0.24; 'bytes': 0.24; 'mon,': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:wiki': 0.31; 'url:wikipedia': 0.31; 'standards': 0.33; '"the': 0.34; 'subject:from': 0.34; 'common': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; "didn't": 0.36; 'url:org': 0.36; 'unit': 0.37; 'skip:& 10': 0.38; 'to:addr:python- list': 0.38; 'though,': 0.39; 'to:addr:python.org': 0.39; 'hardware': 0.61; 'today': 0.64; 'different': 0.65; 'containing': 0.69; 'computers': 0.72; 'subject:get': 0.81; 'college,': 0.84; 'cyber': 0.84; 'edwards': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=36UvTCTJgRSDGbgjAiB/alhyEkQvPBwddCsS2e6n05k=; b=V43aoIFdZ0jpP1TTurMIoKeePe7ttzcciX/V9lFJOn28ujXrDrv3z4JSRE2zyTTji+ wJD5TEQyJZziKuKzmMPRS2m1dYxQ6WFMQfaRfs+KMIcLzER6K0yTMAHA61p5ZzD8H9ZK g5yXOitiVK0Bx8ACAYkK1+fYw23xRWqV87fJAtpoGG5oEp4cfh9jKFlFIPtQsv8/vqFU GGh0JooESP/Fe+Gj9sOMh1mVPlCgxxxwHpWXMH2u5RsKAisexfsAcCg64Ek7QcQHeKK2 P0FxRuBd4lGaiV+P+I/voP9g5Od9F7o9zBG4PlYhRBcn9QzLCJC0tjQAo+LRAaR+D/pl eLWA== MIME-Version: 1.0 X-Received: by 10.229.34.199 with SMTP id m7mr3190383qcd.50.1370299301898; Mon, 03 Jun 2013 15:41:41 -0700 (PDT) In-Reply-To: References: Date: Mon, 3 Jun 2013 15:41:41 -0700 Subject: Re: How to get an integer from a sequence of bytes From: Dan Stromberg To: Python List Content-Type: multipart/alternative; boundary=14dae9d710fe204f8b04de47ab43 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 61 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370299311 news.xs4all.nl 15929 [2001:888:2000:d::a6]:47251 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46816 --14dae9d710fe204f8b04de47ab43 Content-Type: text/plain; charset=ISO-8859-1 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 > > "The size of the byte has historically been hardware > dependent and no definitive standards existed that mandated the > size." > > That's why IEEE standards always use the word "octet" when referring a > value containing 8 bits. > 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. Today though, it would be difficult to sell a conventional (Von Neumann) computer that didn't have 8 bit bytes. Quantum computers would still sell if they were odd this way - they're going to be really different anyway. --14dae9d710fe204f8b04de47ab43 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

= On Mon, Jun 3, 2013 at 7:31 AM, Grant Edwards <invalid@invalid.inval= id> wrote:
That's a common assumption, but historic= ally, a "byte" was merely the
smallest addressable unit of memory. =A0The size of a "byte" on w= idely
used used CPUs ranged from 4 bits to 60 bits.

Quoting from http://en.wikipedia.org/wiki/Byte

=A0 =A0 "The size of the byte has historically been hardware
=A0 =A0 =A0dependent and no definitive standards existed that mandated the<= br> =A0 =A0 =A0size."

That's why IEEE standards always use the word "octet" when re= ferring a
value containing 8 bits.

When I was a F= reshman in college, I used a CDC Cyber a lot; it had 6 bit bytes and 60 bit= words.=A0 This was in 1985.

Today though, it would be di= fficult to sell a conventional (Von Neumann) computer that didn't have = 8 bit bytes.=A0 Quantum computers would still sell if they were odd this wa= y - they're going to be really different anyway.

--14dae9d710fe204f8b04de47ab43--