https://news.ycombinator.com/item?id=12071686
[0] Because there are only 8 bits to store the axle counter for whether the train has passed, and you don't want overflow to zero.
https://news.ycombinator.com/item?id=12071686
[0] Because there are only 8 bits to store the axle counter for whether the train has passed, and you don't want overflow to zero.
If you're worried about double-counting an axle you probably need to design your axle counters better.
(Did a bit of research, at least one has existed: http://cs.trains.com/trn/f/111/t/72627.aspx)
In the steam era, things were rather different. Steam power requires a linkage of rather large drive wheels, which generally means you need unpowered leading and trailing wheelsets for stability and performance purposes. The trailing wheels are almost purely to support the weight on the back end of the locomotive, but leading wheels also help with curves in addition to supporting weight on the front end. Single leading axles were quite common in the steam era, with 2-8-0 being perhaps the single most common arrangement.
It seems like you'd want to do something like: (max axles) = 256 - (% of missing an axle) * (number of axles)
More or less. (Obvs you'd have to know the chance of missing an axle - but without a reasonable guess at this it seems you couldn't really set the max value accurately)