help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About "set bits"


From: Thien-Thi Nguyen
Subject: Re: About "set bits"
Date: Fri, 12 Apr 2013 06:39:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

() Barry Margolin <barmar@alum.mit.edu>
() Thu, 11 Apr 2013 11:19:54 -0400

   True, these phrases can be ambiguous. But often the context and
   examples help quite a bit in figuring out the intent. In this case,
   there were a couple of examples; "bits" tells you to think in binary,
   and if you examined the binary values of the examples it should
   quickly become apparent what was meant.

Yes, i think if OP were to try more stuff in *scratch*, such questions
could be avoided.  In this case, i wrote examples that (to me) seem easy
to inspect and mentally verify, so that *scratch* is not even necessary.

(Although probably they could use some additional bit-field diagrams:

   1
   5      8 7      0
  ┌────────┬────────┐
  │00101000│00011100│  =>  (2 3 4 11 13)
  └────────┴────────┘
      28       1C

and

   1
   5      8 7      0
  ┌────────┬────────┐
  │00011100│00101000│  =>  (3 5 10 11 12)
  └────────┴────────┘
      1C       28

Let's hope people will step forward and improve the docs over time.)

-- 
Thien-Thi Nguyen
GPG key: 4C807502

Attachment: pgpBSaJCCLXR9.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]