Picking A CRC

You send a file, but how do you know it arrived intact? In other words, how do you know that it didn’t get cut off, garbled, or changed somehow? Simplistically, you could just add up all the bytes in the file — a checksum — and send that along with the file. You compute the checksum when you know the file is good, and the receiver can compare the checksum to see if they match.

However, a simple addition doesn’t catch certain classes of errors, which is why there are better checksum algorithms that, for example, wrap the carry bit around or otherwise modify files with common errors so they produce different checksums. There are two problems with checksums. First, no matter how much you modify the algorithm, the chances that two files produce the same checksum are pretty high. Especially with common error patterns.

For example, assume a very simple algorithm that simply adds the bytes and discards any carry. If a file contains 0x80, 0x80, those numbers essentially cancel each other out. If you replace them with 0, 0, you’ll get the same checksum. To some degree, using anything other than a second copy of the entire file will have this problem — some corruption goes undetected — but you want to minimize the number of times that happens.

The other problem is that a checksum by itself doesn’t let you correct anything. You know the data is bad, but you don’t know why. If you think about it, the simplest checksum is a parity bit on a byte: odd parity is simply summing all the bits together. If the parity bit doesn’t match, you know the byte is bad, but you don’t know why. Any even number of errors goes undetected, but I am sure one-, three-, five-, or seven-bit errors will get caught.

People invent better error-checking codes by devising schemes that can promise they can detect a certain number of bit flips and, at least in some cases, correct them. One of these is the cyclic redundancy check (CRC). It is easy to think of the CRC as a “strong checksum,” but it actually works differently. What’s more, there isn’t just a single CRC algorithm. You have to select or design a particular algorithm based on your needs. Most people pick a “named” implementation like CCITT or Ethernet and assume it must be the best. It probably isn’t.

A CRC is a checksum in the broad sense: you feed it a message, and it gives you a small value that you append, store, or compare later. But unlike a simple additive checksum, a CRC is based on polynomial division over GF(2), which is a fancy way of saying “divide using XOR instead of carries.” That detail matters. It gives CRCs very strong guarantees against common classes of errors, provided you choose the right polynomial for the job. That’s the key. You must choose the right polynomial.

Continue reading “Picking A CRC”

A Peek Inside The Secret Lagercrantz Suitcase Radio

What counts as portable is somewhat a matter of opinion, especially over the years. [Helge Fykse] has a portable spy radio of Swedish origin. For its time, it was considered very portable, crammed into a good-sized suitcase.

You can see the large crystal that sets the transmit frequency and a key to send Morse code. The receiver has a VFO, so it was more agile. Based on the regenerative knob, it appears the receiver was of the regenerative type. The suitcase had its own battery, and with tubes, it could probably put out some kind of signal if connected to anything metal, like bedsprings, a clothesline, or anything. There was a lightbulb to let you see when you were transmitting maximum power.

Speaking of tubes, there were five inside, two for the transmitter and three for the receiver. The radio had storage for spare tubes, and the agent could maintain the radio in the field.

You not only get a peek inside the suitcase, but a look at the schematic. The radio is a model of simplicity, but we are certain it did its job.

We love looking at exotic spy gear, especially radios.

Continue reading “A Peek Inside The Secret Lagercrantz Suitcase Radio”

NASA Announces Artemis III Crew And Ambitious Goals

When the Artemis lunar program was first conceived, the third mission would have seen astronauts step foot on the Moon for the first time since Apollo 17 in 1972. But as hard as getting into space is, a sojourn to our nearest celestial neighbor is even more mindbogglingly complex, and so earlier this year it was announced that actually landing on the Moon would be pushed out to the fourth mission.

In turn Artemis III would take a page out of the Apollo 9 playbook and test out rendezvous and docking procedures with commercial landers while operating in the relative safety of low Earth orbit. Moving the target date for the landing a few years down the road gave all involved parties a little more breathing room, but it also provided a valuable opportunity to gain insight into the performance of the vehicles and systems ahead of the critical moment. In the original timeline, the first time Orion would attempt to dock with the lander would have been just before descending to the lunar surface — leaving precious little time to troubleshoot should anything go wrong.

Yesterday NASA held a press conference to update the public on their progress towards the planned 2027 launch of Artemis III, which included the long-awaited announcement of the crew that will kick the tires on the next-generation lunar landers being developed by SpaceX and Blue Origin

Continue reading “NASA Announces Artemis III Crew And Ambitious Goals”

Powering Up A Pluggable Module From The 1948 IBM 604 Electronic Calculator

In that awkward transition phase between electromechanical accounting systems used in the 1940s and the introduction of fully digital computers we find systems such as the IBM 604 Electronic Calculator, advertised for accounting, calculating and engineering tasks. While not capable of complex instructions, loops and other advanced features, it did use an interesting modular architecture with easily swappable modules containing a vacuum tube and associated components. Recently [Ken Shirriff] took a poke at one of these and even powered it up.

This kind of pluggable system would become a staple of computer systems, as they enabled the use of modules or cards with specific functions that could be swapped and combined at will to increase system flexibility, lower costs and make repairs a snap. For the IBM 604 a total of about 1250 vacuum tubes were used, apparently all of which were found on these pluggable modules.

The module that [Ken] got his hands on has a thyratron tube, which is effectively a high current switch and rectifier. In the short demonstration video you can see it being used to switch a lamp on and off, with further details explained in the article.

Despite being rather limited in its functionality and limited by the punch card input and output speed, the IBM 604 was still a smashing commercial success with over 5600 units produced. A transistorized prototype version with 2200 transistors and 95% less power usage was created in 1954 that formed the basis for the IBM 608, the world’s first commercial all-transistorized calculator.

The 608 didn’t last too long, however, as at that point the breakneck pace of semiconductor technology meant that any newly released product was already obsolete by the time it hit the market. Despite this, fundamentals like pluggable modules would keep showing up over and over, ranging from the 1950s Bendix G-15 to even modern day systems, including PCs with pluggable RAM and expansion cards as well as mainframes where hot swapping of even entire CPU modules is just another feature.

Continue reading “Powering Up A Pluggable Module From The 1948 IBM 604 Electronic Calculator”

Revisiting Using AI Coding Assistants: You’re Holding It Wrong Edition

After scathing accusations of skimping on due diligence, as well as other feedback to my article on trying to use an ‘AI coding assistant’ for the first time, the only rational, academic response is to lick one’s wounds following a particularly bruising peer review and try to address the raised issues. Reality after all does not care about one’s feelings, and there may be more to this AI assistant technology that can be coaxed out with a more in-depth look.

To this end I’ll do my best to try and work through each raised point, criticism and accusation, to see what I – and perhaps others – can learn of this endeavor. Said points include the use of the wrong frontend – i.e. Copilot – and the wrong model – being Claude Haiku 4.5 – as well as the egregious flaw on my end of ‘prompting wrong’.

For the sake of due diligence the best frontend and models will be investigated for particular tasks, with finally the verbal minefield of ‘prompt engineering’ examined for industry-standard approaches.

Continue reading “Revisiting Using AI Coding Assistants: You’re Holding It Wrong Edition”

Ask Hackaday: How Do You Feel About Electronic Shelf Labels?

Unless you’ve spent the last few years locked indoors and had all of your goods delivered to you — a not entirely implausible situation, given our audience — you’ve likely noticed the growing popularity of electronic shelf labels (ESLs). They’ve been a common sight in grocery stores like Aldi for some time, and major retailers such as Walmart and Home Depot have been expanding their use of the technology.

On the surface, it makes perfect sense. With electronic ink displays, you can create a price tag that looks enough like a paper label that the customer’s experience isn’t really any different, but the retailer doesn’t have to send somebody out to update the prices. Sure, the upfront cost is higher than a roll of sticky paper, but theoretically, the ESLs should pay for themselves thanks to the reduced labor costs.

It’s the sort of high-tech solution to a common problem that one of us would have come up with. If this were a decade ago, we wouldn’t have been surprised to see something like this get entered into the Hackaday Prize. It might have even won.

Now that the technology is becoming commonplace, there’s even more reason for hardware hackers to be interested in it. Since most of these tags will show whatever image you beam over to them via radio or infrared, we’ve seen a number of projects that repurpose second-hand tags as convenient data displays.

Rather than showing the price of milk, they can show the current price of Bitcoin. Or maybe you’d like to stick them up all over the house to display the weather forecast and your family calendar. They’ve been repurposed as badges at hacker cons, and at least one industrious hacker has used a discarded ESL to show an alert whenever a new episode of the Hackaday Podcast drops.

But not everyone is happy about ESLs. Recently, the United Food and Commercial Workers (UFCW) International Union released the results of a poll showing that most American consumers are opposed to ESLs, citing concerns that the technology would ultimately lead to higher prices.

Continue reading “Ask Hackaday: How Do You Feel About Electronic Shelf Labels?”

Know Your Food: Cheesemaking

There’s a thing that people who grew up on farms all share: a connection with food production that isn’t some mystical rose-tinted woo from a TV chef, but instead a practical general knowledge from being there on the ground. A glance at a crop in a field and you immediately recognise what it is, if it’s ploughing time you’ll know the soil type, and there’s always either too little, or too much rain. For a given foodstuff you’ll know far too much about where it came from, because if your dad wasn’t involved in its production, the chances are someone he knew was. You take this for granted, after all doesn’t everyone have this general knowledge? Seemingly not.

Hackaday is not a cooking channel, but I know we’re all interested here in how things are made. Shouldn’t that also extend to what we eat? It’s fashionable to follow a back-to-nature line that all commercial foodstuffs are somehow over-processed junk, but without the requisite knowledge you’re flying blind there. To know both how common foodstuffs should be made, as well as how they are made industrially, should be an essential for everyone.

Continue reading “Know Your Food: Cheesemaking”