The Pentium Processor’s Innovative (and Complicated) Method Of Multiplying By Three, Fast

[Ken Shirriff] has been sharing a really low-level look at Intel’s Pentium (1993) processor. The Pentium’s architecture was highly innovative in many ways, and one of [Ken]’s most recent discoveries is that it contains a complex circuit — containing around 9,000 transistors — whose sole purpose is to multiply specifically by three. Why does such an apparently simple operation require such a complex circuit? And why this particular operation, and not something else?

Let’s back up a little to put this all into context. One of the feathers in the Pentium’s cap was its Floating Point Unit (FPU) which was capable of much faster floating point operations than any of its predecessors. [Ken] dove into reverse-engineering the FPU earlier this year and a close-up look at the Pentium’s silicon die shows that the FPU occupies a significant chunk of it. Of the FPU, nearly half is dedicated to performing multiplications and a comparatively small but quite significant section of that is specifically for multiplying a number by three. [Ken] calls it the x3 circuit.

The “x3 circuit”, a nontrivial portion of the Pentium processor, is dedicated to multiplying a number by exactly three and contains more transistors than an entire Z80 microprocessor.

Why does the multiplier section of the FPU in the Pentium processor have such specialized (and complex) functionality for such an apparently simple operation? It comes down to how the Pentium multiplies numbers.

Multiplying two 64-bit numbers is done in base-8 (octal), which ultimately requires fewer operations than doing so in base-2 (binary). Instead of handling each bit separately (as in binary multiplication), three bits of the multiplier get handled at a time, requiring fewer shifts and additions overall. But the downside is that multiplying by three must be handled as a special case.

[Ken] gives an excellent explanation of exactly how all that works (which is also an explanation of the radix-8 Booth’s algorithm) but it boils down to this: there are numerous shortcuts for multiplying numbers (multiplying by two is the same as shifting left by 1 bit, for example) but multiplying by three is the only one that doesn’t have a tidy shortcut. In addition, because the result of multiplying by three is involved in numerous other shortcuts (x5 is really x8 minus x3 for example) it must also be done very quickly to avoid dragging down those other operations. Straightforward binary multiplication is too slow. Hence the reason for giving it so much dedicated attention.

[Ken] goes into considerable detail on how exactly this is done, and it involves carry lookaheads as a key element to saving time. He also points out that this specific piece of functionality used more transistors than an entire Z80 microprocessor. And if that is not a wild enough idea for you, then how about the fact that the Z80 has a new OS available?

Get Into Meshtastic On The Cheap With This Tiny Node Kit

There’s been a lot of buzz about Meshtastic lately, and with good reason. The low-power LoRa-based network has a ton of interesting use cases, and as with any mesh network, the more nodes there are, the better it works for everyone. That’s why we’re excited by this super-affordable Meshtastic kit that lets you get a node on the air for about ten bucks.

The diminutive kit, which consists of a microcontroller and a LoRa module, has actually been available from the usual outlets for a while. But [concretedog] has been deep in the Meshtastic weeds lately, and decided to review its pros and cons. Setup starts with flashing Meshtastic to the XIAO ESP32-S3 microcontroller and connecting the included BLE antenna. After that, the Wio-SX1262 LoRa module is snapped to the microcontroller board via surface-mount connectors, and a separate LoRa antenna is connected. Flash the firmware (this combo is supported by the official web flasher), and you’re good to go.

What do you do with your new node? That’s largely up to you, of course. Most Meshtastic users seem content to send encrypted text messages back and forth, but as our own [Jonathan Bennett] notes, a Meshtastic network could be extremely useful for emergency preparedness. Build a few of these nodes, slap them in a 3D printed box, distribute them to willing neighbors, and suddenly you’ve got a way to keep connected in an emergency, no license required.

The Road To Lucid Dreaming Might Be Paved With VR

Lucid dreaming is the state of becoming aware one is dreaming while still being within the dream. To what end? That awareness may allow one to influence the dream itself, and the possibilities of that are obvious and compelling enough that plenty of clever and curious people have formed some sort of interest in this direction. Now there are some indications that VR might be a useful tool in helping people achieve lucid dreaming.

The research paper (Virtual reality training of lucid dreaming) is far from laying out a conclusive roadmap, but there’s enough there to make the case that VR is at least worth a look as a serious tool in the quest for lucid dreaming.

One method of using VR in this way hinges on the idea that engaging in immersive VR content can create mild dissociative experiences, and this can help guide and encourage users to perform “reality checks”. VR can help such reality checks become second nature (or at least more familiar and natural), which may help one to become aware of a dream state when it occurs.

Another method uses VR as a way to induce a mental state that is more conducive to lucid dreaming. As mentioned, engaging in immersive VR can induce mild dissociative experiences, so VR slowly guides one into a more receptive state before falling asleep. Since sleeping in VR is absolutely a thing, perhaps an enterprising hacker with a healthy curiosity in lucid dreaming might be inspired to experiment with combining them.

We’ve covered plenty of lucid dreaming hacks over the years and there’s even been serious effort at enabling communication from within a dreaming state. If you ask us, that’s something just begging to be combined with VR.

This Laser Knows About Gasses

What’s that smell? If you can’t tell, maybe a new laser system from CU Bolder and NIST can help. The device is simple and sensitive enough to detect gasses at concentrations down to parts per trillion.

The laser at the system’s heart is a frequency comb laser, originally made for optical atomic clocks. The laser has multiple optical frequencies in its output. The gas molecules absorb light of different wavelengths differently, giving each type of molecule a unique fingerprint.

Continue reading “This Laser Knows About Gasses”

Tearing Down A Vintage Word Processor

There was a time when the line between typewriters and word processing software was a bit fuzzy. [Poking Technology] found a Xerox 6040 which can’t decide what it is. It looks like a typewriter but has a monitor and a floppy drive, along with some extra buttons. You can watch him tear it down in the video below.

The old device uses a daisywheel type element, which, back then, was state of the art. A wheel had many spokes with letters and the printer would spin the wheel and then strike the plastic spoke.

Continue reading “Tearing Down A Vintage Word Processor”

Trio Of Mods Makes Delta Printer More Responsive, Easier To Use

Just about any 3D printer can be satisfying to watch as it works, but delta-style printers are especially hypnotic. There’s just something about the way that three linear motions add up to all kinds of complex shapes; it’s mesmerizing. Deltas aren’t without their problems, though, which led [Bruno Schwander] to undertake a trio of interesting mods on his Anycubic Kossel.

First up was an effort to reduce the mass of the business end of the printer, which can help positional accuracy and repeatability. This started with replacing the stock hot-end with a smaller, lighter MQ Mozzie, but that led to cooling problems that [Bruno] addressed with a ridiculously overpowered brushless hairdryer fan. The fan expects a 0 to 5-VDC signal for the BLDC controller, which meant he had to build an adapter to allow Marlin’s 12-volt PWM signal to control the fan.

Once the beast of a fan was tamed, [Bruno] came up with a clever remote mount for it. A 3D-printed shroud allowed him to mount the fan and adapter to the frame of the printer, with a flexible duct connecting it to the hot-end. The duct is made from lightweight nylon fabric with elastic material sewn into it to keep it from taut as the printhead moves around, looking a bit like an elephant’s trunk.

Finally, to solve his pet peeve of setting up and using the stock Z-probe, [Bruno] turned the entire print bed into a strain-gauge sensor. This took some doing, which the blog post details nicely, but it required building a composite spacer ring for the glass print bed to mount twelve strain gauges that are read by the venerable HX711 amplifier and an Arduino, which sends a signal to Marlin when the head touches the bed. The video below shows it and the remote fan in action.

Continue reading “Trio Of Mods Makes Delta Printer More Responsive, Easier To Use”

Run Xbox 360 Games On Your PC With XenonRecomp

Inspired by the N64: Recompiled project, XenonRecomp does something similar, except for the PowerPC-equipped Microsoft Xbox 360 game console. Based around the triple-core IBM CPU codenamed ‘Xenon‘, the Xbox 360 was released in 2005 and generally quite successful over its lifespan despite its Red Ring of Death issues. Although the current Xbox Series X supports running a number of Xbox 360 games, this is done via emulation and only 632 games out of 2,155 are supported.

This is where XenonRecomp not only promises turning the games into native (x86) software, but also allowing for a range of graphical improvements. Best of all, it allows for Xbox 360 games to be preserved instead of linked to an obsolete console. That said, much like with N64Recomp, it’s not a simple matter of running a tool over the PPC binary. You’re expected to have in-depth systems knowledge, with the tools in XenonRecomp assisting with the decompilation (into C++) and the recompilation into x86 binaries, but support for PPC instructions, VMX (vector instructions) and aspects like jump table conversion and (currently missing) MMIO support are likely to present an enterprising developer with hours of fun to implement and debug when issues arise.

Continue reading “Run Xbox 360 Games On Your PC With XenonRecomp”