Results 1 to 5 of 5

Thread: word bits?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    word bits?

    Hi there, i'm having a few problems shifting a word about. i need to have the first 4 bits equal to 3 and the following 12bits to be an offset

    e.g.

    4bits = 3
    12bits = 2000

    i'm not sure if i am doing it correctly. doesnt seem to work.

    diff = a word value such as 2000

    Code:
    output := (Diff and $FFF) or (3 shl 12);
    any help will be appreciated
    Last edited by Colin; 28-03-2011 at 04:37 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •