On DCC and base ten numbers...

BigJake May 17, 2023

  1. BigJake

    BigJake TrainBoard Member

    3,299
    6,339
    70
    I've seen many examples here and elsewhere, and even in decoder datasheets/instructions, trying to explain how to turn on/off a DCC feature by adding or subtracting decimal values. But they always depend on whether the feature is already enabled or not. Well, how do you figure that out?

    Our ancestors discovered numbers in base ten (since we have ten fingers). But what if they had invented binary numbers instead? We could count to the equivalent of decimal 31 (1,1111) on one hand, and 1023 (11,1111,1111) on both hands!

    Young kids are taught to learn sign language easily enough, including finger-spelling. So surely they can be taught binary numbers and counting on their hands just as easily.

    Then bitwise boolean operations would make perfect sense.

    Hexadecimal (base 16) is a simple jump from binary, which simply groups and names sets of four bits, identified by a single character/digit. It's a lot easier to say (and remember) 1F or 3FF than the equivalent strings of ones and zeroes.

    So ideally, we should teach numbers, counting and arithmetic in hex, rather than decimal. And throw in boolean logic operations (and, or, xor, not) while we are at it.

    Just think of it like metric vs imperial... Except metric prefixes are base 10 (decimal, not binary or hex!)

    If only our ancestors had learned to count in binary on their fingers...

    "There are 10 kinds of people in this world:
    Those that understand binary numbers,
    And those that don't."
     
    Nil likes this.
  2. in2tech

    in2tech TrainBoard Member

    2,703
    7,639
    78
    I have a math headache :)
     
    sidney and Hardcoaler like this.
  3. DCESharkman

    DCESharkman TrainBoard Member

    4,410
    3,113
    87
    Another idealist trying to change the world, welcome to my club! Mathematics is taught incorrectly in schools and has been for decades.
    My way of thinking is to marry math and science. For example, let's tackle multiplication and division and see the results. I did this as an example for my daughters 4th grade class. We would use ohms law in a simple circuit and see how a LED behaves when different resistors are used in a single loop circuit. It really had a positive impact on all of the students. They saw math in action!

    Binary mathematics are a horse of a different color because there is no real world simple example like Ohms law to relate it to. In fact in my undergraduate Electrical Engineering classes we only had access to 4 bit processors in our base computer class. I have to say that was my only experience with digital systems before DCC. I specialized in Electromagnetics, wave and field theory, but I still have my Digital Systems theory textbook, and I leaned on that when first getting DCC, then along came JRMI and I let it do the thinking for me. Much more efficient.
     
    Hardcoaler likes this.
  4. Todd Hackett

    Todd Hackett TrainBoard Member

    93
    201
    8
    David: Your story about using Ohm's Law to teach brought back memories. Just having 'dry' trig was a PITA for me as nobody could ( or would ) relate it to the real world. This rendition is not quite the same as using a formula for teaching, it is more or less remembering what the formula does. My daughter was learning trig and when presented with the Pythagorean Theory, she asked me big eyed 'why in the world do I need this'. Think 3,4,5 - using the 3 and 4 as legs and the 5 as the hypotenuse you could reconstruct the formulas for all of the angles as a test case to apply to what your actual problem is. In my case, I could never remember the sin, cos formula stuff. There also is a real world application: Say you are physically laying out some wall construction and you do NOT have a framing square. You want a new wall coming off the base wall at 90 degrees. Sure, you could rely on your perfect 90 degree Skill Saw cross-cut of the new wall and align butting one end to the base wall. I have never seen any carpenter align his saw or be able to do that exact 90 degree cross-cut. Anyway, position the walls so they look to be close to 90 Degrees. Measure 3 ft up on one and make a mark, 4 feet across on the other and make another mark. Now grab your tape and place between your 2 marks and move the wall with the 4 ft mark until it reads 5 ft. You are now a pencil width from 90 degrees. Sure there are other steps you need to take, but generally speaking it is what it is. You can use 6,8,10 also. Note that once you get the 2 walls setup, you can also do this on the vertical - closer than any level. Probably picking nits. St00pid story isn't it?

    I taught the daughter binary when she was doing simple math and having problems with simple division. Hay, said I - here is something to think about. Then I proceeded to show her how binary worked, what each bit position represented in decimal and then how to divide ( or multiply ). She was 8 or 10, don't remember. She did realize that doing multiple bit shifts she could divide by 2, 4, 8, 16 and adding/subtracting one result was pretty easy for those odd numbers. She was able to handle hex too. Think that she still knows but is probably rusty. One thing that it did do it that it got her through algebra associating some variable for some string of which nobody seems to get immediately.

    Later
     
    Hardcoaler and Nil like this.
  5. Sumner

    Sumner TrainBoard Member

    2,836
    5,970
    63
    Yep, I have framing squares but still used that method....
    [​IMG]
    https://purplesagetradingpost.com/sumner/newhouse/house-index.html

    ... on my house I was building above and the commercial building to the left along with the batter boards in the picture to layout the foundation and later interior room walls. Along with a final check diagonally across corners to make sure the distance is the same.

    Never used it vertically though trusted my long level for that. Used it for aligning car and trailer frames also. Of course if some people maybe never build anything they were right in that they didn't need to learn it but the more tools I have in the tool box the more apt I am to try something new :)
     
    Hardcoaler and Todd Hackett like this.
  6. Nil

    Nil TrainBoard Member

    30
    55
    2
    We were taught about non-decimal number systems in high school (pre-1970). I'm a geek, I found it exciting and tried to talk to my parents about it. They never asked about school again.

    For entertainment, I used to write down binary (and other bases) numbers. At one point I filled up the margins on an Amtrak schedule with them. In the club car, a young lady revealed that she was taking computer science. AHA! I thought, and pulled out the defaced schedule.

    At least she didn't run away screaming.

    And yes, that is true, incredible as it may seem. I wonder what she said to her friends about "that weirdo."
     
    Hardcoaler likes this.
  7. Todd Hackett

    Todd Hackett TrainBoard Member

    93
    201
    8
    NIL: I hated math in grade/high school, hated it as there was no rhyme or reason; unless you were talking about base 10 - money. I did not find binary until about 1972 when I got around IBM mainframes. Started the learning process of COBOL and Assembler, never could quite grab RGP though. Even though my degree is in Electronics, to this day I write Assembly. Mostly for Atmel ( Microchip ) projects now, pretty much most of the 8 bit processors of lore over the years including that $1 wonder Z80; that was and probably still is my favorite. Math skills have pretty much gone away as I don't use it as much as I used to. Can still get through the quadratic equation after a couple of try's, but Calc is out of the question.

    Later
     
  8. BigJake

    BigJake TrainBoard Member

    3,299
    6,339
    70
    Depends on whether she was majoring in CS because somebody said she could make good money at it, or because she liked it.
     
  9. Nil

    Nil TrainBoard Member

    30
    55
    2
    How do you erase a post!!??

    OK, it seems you don't. Oh, well, please disregard this one.

    Sorry for wasting your time.
     
    Last edited: May 19, 2023
  10. Hardcoaler

    Hardcoaler TrainBoard Member

    10,763
    45,478
    142
    Math isn't my strong suit, so I married a CPA. :)

    In the early 1960s when I was young, Santa brought me a Digi-Comp I binary mechanical computer. I'm not sure why. Neither of my parents were Engineers and it wasn't until years later that was formally introduced to bases in mathematics. I grasped base 2 arithmetic and remember watching the "action" as things moved within it, but didn't see any intrigue in the thing.

    upload_2023-5-19_15-36-10.png
     
    Last edited: May 19, 2023
    Nil likes this.
  11. DCESharkman

    DCESharkman TrainBoard Member

    4,410
    3,113
    87
    Well as a consultant in Theoretical Physics, and Electrical Engineering ( Wave and Field Theory) I still use calculus and other Mathematica on a daily basis.
    Anyone else here work equations in 24 or more dimensions? Now you know why I am considered slightly insane.
     
    Hardcoaler likes this.
  12. Glenn Butcher

    Glenn Butcher TrainBoard Member

    178
    344
    9
    I got three degrees in computing, only four math courses among them. It can be done...

    It caught up with me in my doctorate. Presenting my data to the committee, my chair says, "I think the point on the curve you're looking for could be described by the second derivative." Pfftt...

    Spent two weeks boning up on derivative calculus, for which in college the only exposure I got was from a business math course where the last chapter in the book was an intro to limits and the 2nd derivative. Went back to my data, plotted it out, and no, the 2nd derivative was somewhere else.

    Briefed that at my next meeting, he says, "Well, I think you're right. Go on..." :mad:

    One of the four courses was discrete math for computer science. Much more comfortable with all that...
     
    BigJake and Hardcoaler like this.
  13. CSX Robert

    CSX Robert TrainBoard Member

    1,503
    640
    41
    Yeah, but when you got to four (00100) you'd be flipping someone off!
     
    Glenn Butcher likes this.
  14. DCESharkman

    DCESharkman TrainBoard Member

    4,410
    3,113
    87
    I am the crazy one because I have the triple PhD, Theoretical Physics, Electrical Engineering and Analytical Mathematics. That last one has bolstered up the first two quite well. Might be why DCC is a bit frustrating, in that it has been around for a while with very little innovation in the last 20 years. Sound has gotten better and incremental upgrades, but by now a little AI should be in the mix to determine when the locomotive is low or out of fuel, needs more sand or water or a random failure in a consist. That would add to the modelling a great deal.
     
    Hardcoaler and Glenn Butcher like this.
  15. BigJake

    BigJake TrainBoard Member

    3,299
    6,339
    70
    Counting with fingers on a surface (like a piano, but any somewhat flat surface) is much faster than counting by folding/extending fingers in mid-air. Once practiced on a surface extensively, the surface isn't really needed any more (think "air-piano")
     
    Glenn Butcher and Hardcoaler like this.
  16. BigJake

    BigJake TrainBoard Member

    3,299
    6,339
    70
    After going through Calculus III and Advanced Applied Math I, I chose Numerical Methods as my final math class for Electrical Engineering. It was eye-opening, and amazingly applicable throughout my career. I never had to do even a double integral for work, but I often ran into issues on the job that were formalized in that Numerical Methods class.
     

Share This Page