Question: Railways have devices called axle counters that count up how many train axles have passed by , and helps decide if a train has fully

Railways have devices called "axle counters" that count up how many train axles have passed by, and helps decide if a train has fully passed part of a track.
However, because of a bug in the design of the axle counter logic, a train that has exactly 256 axles will result in a count of 0, and its existence will be ignored. Thus, trains that run on these buggy railways must have less than 256 axles.
What is the most likely cause of this bug?
Choose 1 answer:
Choose 1 answer:
(Choice A) Incorrect use of integer instead of floating-point representation
A
Incorrect use of integer instead of floating-point representation
(Choice B) Integer overflow error
B
Integer overflow error
(Choice C) Round-off error in floating-point arithmetic
C
Round-off error in floating-point arithmetic
(Choice D) Limited precision of floating-point numbers
D
Limited precision of floating-point numbers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!