Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

What is bit 3?

2616 views
5 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    May 2015
  • 19 posts
What is bit 3?
Posted by Jim Cubie on Friday, October 28, 2016 6:50 PM

I have a Loksound decoder in a loco.  I want to change performance to eliminate prime mover startup delay.  The manual says "delete bit3 of CV 124."  What does this mean?  I use decoder pro and CV 124 is easy to find.  By how much do I change the value in CV 124 or do I do something else?

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Friday, October 28, 2016 7:28 PM

Each CV is made up of 8 bits.

That's a binary digit, base 2. So while a number like 542 is 5 hundreds, 4 tens, and 2 ones, a binary number like 10110101 is 1 * 128, 0 * 64, 1 * 32, 1 * 16, 0 * 8, 1 * 4, 0 * 2, and 1 * 1. Bits are counted right to left, just like decimal numbers, but since computers start counting at 0, the right must place is the 0th bit. In the example 10110101, Bit 0 is 1, bit 1 is 0, bit 2 is 1, and bit 3 is 0. Bits 4 and 5 are 1, bit 6 is 0, and bit 7 is 1.

 In decimal you have 1's, 10's, 100's, 1000's, etc. In Binary you have 1's, 2's, 4's, 8's, etc. Powers of 2 - 2^0 for the zero bit is 1. 2^1 for bit one is 2, 2^2 for bit 2 is 4, 2^3 for bit 3 is 8. So, if bit 3 is currently on (1) and you want to turn it off (0), subtract 8 from the current value in the CV. If bit 3 is currently 0 and you want to make it 1, add 8 to the current value of the CV. Adding or subtracting 8 will only alter bit 3, none of the others. You can use the Windows calculator and switch to the programmer view and it will do decimal to binary conversions for you can you can plug in various numbers and see this for yourself.

                        --Randy


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    March 2010
  • From: Sherwood Park, Alberta, Canada
  • 252 posts
Posted by CNR378 on Saturday, October 29, 2016 10:16 AM

An easy way to find what a CV does using JMRI, go to the CV pane and change the CV in question and then chnage it back to the original value (it should now be highlighted in orange). Now look at all the other panes to see what items are highlighted in orange. All these items are affected by that CV.

Doing that with CV124 on a Loksound select shows several items on several panes changing. On the Advanced pane, there was a check box for startup delay.

Peter

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, October 29, 2016 10:35 AM

 To each his own, but that feature is one of the things that makes Loksound superior to some of the others and more prototypical. Of course, if you try to MU the Loksound with a different sound decoder that doesn't do that...

                                 --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    May 2015
  • 19 posts
Posted by Jim Cubie on Monday, October 31, 2016 7:07 PM

Many thanks

  • Member since
    January 2003
  • From: Brisbane Australia
  • 568 posts
Posted by Alantrains on Tuesday, November 1, 2016 6:55 AM

In simple terms, subtract 8 from the current value and set it to that new value.

Alan Jones in Sunny Queensland (Oz)

 

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!