• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cocoa and bit handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa and bit handling


  • Subject: Cocoa and bit handling
  • From: "Peter Karlsson" <email@hidden>
  • Date: Tue, 21 Dec 2004 12:27:14 +0100

Dear list!

I have 2 pointers declared as byte. They are called source and target.

The source pointer points to the first byte of a memory area. The target
pointer points to the first byte of another memory area.

Is there a easy way to move bits fom source byte to target byte?

Example:

Source byte maybe looks like this:
01001011

Target byte looks like this before:
00000000

Target byte looks like this after:
01000000

I want to move bit 3 of the source byte to bit 6 of the target byte. This
will repeat thousands of times in a loop. And the bit position changes
every lap. So next lap I maybe want to move source bit 2 to target bit 5
and so on...

Best regards Peter

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Cocoa and bit handling
      • From: Jiri Volejnik <email@hidden>
    • Re: Cocoa and bit handling
      • From: Stephane Sudre <email@hidden>
  • Prev by Date: Re: Renaming files?
  • Next by Date: Re: NSFilePromisePboardType
  • Previous by thread: NSButton without background
  • Next by thread: Re: Cocoa and bit handling
  • Index(es):
    • Date
    • Thread