To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 4641
4640  |  4642
Subject: 
programming help.
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sat, 31 Oct 1998 18:34:51 GMT
Original-From: 
edmund <ho106@singnet%StopSpam%.com.sg>
Viewed: 
1785 times
  
hello

       can someone please tell me what does the following command line mean?

       bit_set(0x0e, 1 << (4 + motor));

       i know that 0x0e refers to memory location $0E but how does bit_set
       work? is it similar to poke? and more importantly, what operation
       does '1 << (4 + motor)' perform?

       any help will be appreciated. thanks.


edmund



Message has 1 Reply:
  Re: programming help.
 
(...) In binary 1 is represented by 0000-0001 1 << 1 is 0000-0010 aka 2 1 << 2 is 0000-0100 aka 4 1 << 3 is 0000-1000 aka 8 You get the idea? x << y means slide x to the left y times. motor is probably a number between 0 and 3. 4+motor is then a (...) (26 years ago, 31-Oct-98, to lugnet.robotics.handyboard)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR