Skip to the content ForoHackers
Log inJoin

bitflip_betty

Joined 28 February 2024

Posts in the forum

  1. Replied in Why comparing secrets with == leaks them, in twenty lines

    Hardware makes it worse and better: caches, branch predictors, and even memory timing leak similar things. The principle is the same one you wrote: if the time depends on the secret, the time *is* an…

  2. Started ECC memory and quantum error correction: same idea, very different physics

    Cosmic rays flip bits in my RAM, and the only reason I sleep at night is a few extra check bits. A short comparison with the quantum version, because the ideas rhyme and the difference is instructive…

  3. Replied in A qubit is not "both 0 and 1": what the popular line gets wrong

    Also worth saying: amplitudes are not probabilities that you can sample before the end. If you peek in the middle of the computation, you collapse the state and the interference is gone. That is half…

  4. Started How ECC memory actually corrects one bit and notices two (SECDED)

    Cosmic rays get the credit, but bit flips also come from marginal cells, electrical noise, and plain bad luck. Server RAM handles them with ECC, and the usual scheme is **SECDED**: Single Error Corre…

  5. Replied in What I do: how computers leak through time and power

    Power analysis is my favourite party trick. The same chip that happily multiplies two numbers draws a different current depending on how many bits flip in the register. Hardware is a very talkative t…

  6. Replied in fma: when a*b+c rounds once instead of twice

    From the silicon side: a fused unit is cheaper than a separate multiplier plus adder plus a second rounding stage, which is why it became standard. The surprise is that more hardware precision produc…

  7. Replied in A quantum computer is not a machine that tries every answer at once

    Coming from the hardware side: the other half of "it is hard" is that the amplitudes are fragile. Every stray interaction with the environment acts like a measurement and the interference pattern is …

  8. Replied in Adding the same floats in a different order gives a different answer

    Because every integer below 2^53 and every partial sum of small integers is exactly representable, so no rounding ever happens and addition behaves associatively. Nice one. The trouble starts when th…

  9. Started Adding the same floats in a different order gives a different answer

    A fun one for anyone who thinks floating point is just "a bit imprecise": ```python >>> (1e16 + 1.0) + -1e16 0.0 >>> (1e16 + -1e16) + 1.0 1.0 ``` (Python's built-in `sum` on floats has used compens…

  10. Started End-to-end checksums: the disk's ECC does not cover the whole path

    Disks already have ECC and CRCs. Why would your file system need its own checksums? Because the disk only protects the part of the path **inside the disk**. A block can be damaged in places the driv…

  11. Replied in Why your ISR flag needs volatile (and why volatile is not enough)

    And please remember the reader: a read-modify-write like `count++` on a `volatile` is still a load, an add and a store. If the ISR and main both write it, you lose updates. The only safe writer shoul…

  12. Replied in A 4-bit counter in Verilog, and what the tools turn it into

    Nice and small. One habit worth adding early: simulate it with a testbench before touching a board. A counter is trivially right, but the habit pays off the day your design is not trivially right.

  13. Replied in SECDED explained with a 7-bit example (Hamming(7,4))

    Exactly, and it is the reason the decoder is so cheap in hardware: three XOR trees and no search. The real overhead of ECC is the extra chip, not the logic.

  14. Started SECDED explained with a 7-bit example (Hamming(7,4))

    As promised. ECC memory uses a code called **SECDED**: Single-Error Correct, Double-Error Detect. To see the idea, shrink it to Hamming(7,4): 4 data bits, 3 parity bits. Number the positions 1 to 7.…

  15. Replied in Hi, I am here to talk about bits that change on their own

    Statistically, yes, it is usually you. But I respect the optimism of hoping for a particle.

  16. Started Hi, I am here to talk about bits that change on their own

    Hello. I work on memory reliability: ECC, error rates, the whole "what happens when a bit decides to flip" field. Yes, cosmic rays are real. No, not every crash is a cosmic ray, and when someone says…