Small weird things you've noticed about cars...
Discussion
Fast and Spurious said:
TooLateForAName said:
jimmy156 said:
Just realised after around 5 years of ownership that the max volume in a 2014 Qasqai is 31. why 31?
range of 0-32 means that it uses 5 bits to store the volume : binary values 00000 through 11111Dg504 said:
Fast and Spurious said:
TooLateForAName said:
jimmy156 said:
Just realised after around 5 years of ownership that the max volume in a 2014 Qasqai is 31. why 31?
range of 0-32 means that it uses 5 bits to store the volume : binary values 00000 through 1111132 possible values so 0->31
I knew what I meant...
Edited by TooLateForAName on Friday 29th December 22:20
TooLateForAName said:
Dg504 said:
Fast and Spurious said:
TooLateForAName said:
jimmy156 said:
Just realised after around 5 years of ownership that the max volume in a 2014 Qasqai is 31. why 31?
range of 0-32 means that it uses 5 bits to store the volume : binary values 00000 through 1111132 possible values so 0->31
I knew what I meant...
Edited by TooLateForAName on Friday 29th December 22:20
If you can only use 1s and 0s to write numbers, (or ons and offs if you are a computer), then 11111 is how you write 31, because it is made up of 16 + 8 + 4 + 2 + 1
If you wrote 11110, it would be 16 + 8 + 4 + 2 + 0, so 30.
Hence why computer RAM used to be 16k back in the 1980s, not 15k, then went to 32k, then 64k etc, 128k, 256
Even now, you see laptops with 256Gb SSD drives, not 250 Gb. 256 is a multiple of 2, 250 isn't.
I very much doubt that's the actual reason anyway. A modern car's software will be written in a high level language where the programmer doesn't need to care how the numbers are being stored and manipulated internally and even if they do understand enough about the underlying hardware to know, with even the slowest of modern processors running at hundreds of millions of operations per second, who cares if your volume translation takes a couple of extra clock cycles?
That said, I've no other inkling as to why the highest volume would be 31 so maybe that particular system was written by a particularly geeky programmer.
That said, I've no other inkling as to why the highest volume would be 31 so maybe that particular system was written by a particularly geeky programmer.

kambites said:
I very much doubt that's the actual reason anyway. A modern car's software will be written in a high level language where the programmer doesn't need to care how the numbers are being stored and manipulated internally and even if they do understand enough about the underlying hardware to know, with even the slowest of modern processors running at hundreds of millions of operations per second, who cares if your volume translation takes a couple of extra clock cycles?
That said, I've no other inkling as to why the highest volume would be 31 so maybe that particular system was written by a particularly geeky programmer.
It's probably little to do with the programming. It's almost certainly down to the use of an IC (probably a cheap DA converter) somewhere in the amplifier circuit that only accepts a 5-bit input for the volume. That said, I've no other inkling as to why the highest volume would be 31 so maybe that particular system was written by a particularly geeky programmer.

More idiosyncratic or OCD than weird but my wife's Lexus hybrid displays the hybrid drivetrain animated graphic and depicts the hybrid battery state of charge in 8 blocks that turn blue when each increment is Satisfied i.e. 8 x 12.5% = 100%.
My logical and OCD brain wishes it to be 10 blocks = 10 x 10% = 100%.
Maybe it correlates to number of battery cells in a bank or maybe it's completely arbitrary but why not scale it 10 x 10% = 100%.
There must have been a reason in the programmers/developers mind but I can't think why.
My logical and OCD brain wishes it to be 10 blocks = 10 x 10% = 100%.
Maybe it correlates to number of battery cells in a bank or maybe it's completely arbitrary but why not scale it 10 x 10% = 100%.
There must have been a reason in the programmers/developers mind but I can't think why.
legless said:
It's probably little to do with the programming. It's almost certainly down to the use of an IC (probably a cheap DA converter) somewhere in the amplifier circuit that only accepts a 5-bit input for the volume.
It would be very unusual to simply copy the value from the IC straight onto the user interface or something like a modern car. If nothing else it stops you from using a second-source IC with a different register interface and disguising the difference behind the software. Besides, most of the simple DA and AD converters we use seem to use some convoluted value and shift interface rather than a simple linear value. Bit off topic, anyway.

Edited by kambites on Sunday 31st December 10:49
Gassing Station | General Gassing | Top of Page | What's New | My Stuff


