I wrote a blog post about the Two's Complement
Hi folks, I wrote a blog post about the two's complement. I always scratched my head about some details: - "Take the ones' complement and add one" - "Half of the range are negative numbers" - etc. Now I think I understand these details, but had to piece it together from some sources. I'd love to get your feedback on this post. Looking forward. BR, Pedram
I wrote a blog post about the Two's Complement launched on January 27, 2023 with 12 votes, #1,348 of 3,901 launches that month and more than 75% of that year's launches. The site was still online in September 2026, 3 years on.
In plain words
Pedram has written a blog post explaining two's complement, the binary number system used in computing. The post addresses common points of confusion, including why taking one's complement and adding one works and why negative numbers occupy half the representable range. The author synthesized information from multiple sources to create a comprehensive explanation and welcomes reader feedback.
written from the facts on this page · September 2026
From the sources
I am in the progress of reading the excellent book Code: The Hidden Language of Computer Hardware and Software . The book walks you through the chronology of inventions that made the computer possible. One chapter is dedicated to number representation and arithmentic, which is where the two's complement is naturally explained. This is where I realized that I knew the "how it works", but not the "why it works". The explanation in the book didn't get through to me, either. As I had to piece together the information and couldn't find a source, which did the job for me, I decided to write it down in this article. Imagine you already know how to build a machinery, which can add two positive…from hadjian.com
Does a similar job
all alternatives →- IMI made a calculator that works over disjoint sets of intervalsApr 2026 · victorpoughon.github.io · ▲314
I've been studying interval arithmetic for the past few weeks and it's a really interesting field because while there is a ton of super interesting research published over the past decades, it has never really gotten the recognition that it deserves, IMO. One reason for this is that standard interval arithmetic has really poor handling of division by intervals containing zero. If you compute 1 / [-1, 2] in regular interval arithmetic, you get either [-∞, +∞], or you have to say that the operation is undefined. Both solutions are virtually useless. The real answer of course is [-∞, -1] U…
- IMI made a puzzle game that gently introduces my favorite math mysteries2024 · rahulilango.com · ▲1,054
This is the first iteration of a short game I’m making that tries to interactively explain some of my favorite math questions / ideas. My goal is mostly to get the player curious and not necessarily to explain absolutely everything. There were a lot of fun technical parts to building this: - For implementation reasons, it’s much easier if the lines all have integer intersection points with each other. To do this, when a new line is added I “cheat” by rounding intersections to integers and then splitting the old lines at the intersection into new linds (with potentially different slopes)…
- IWI wrote a technical history book on LispFeb 2026 · berksoft.ca · ▲252
The book page links to a blog post that explains how I got about it (and has a link to sample content), but the TL&DR is that I could not find a lot of books that were on "our" history _and_ were larded with technical details. So I set about writing one, and some five years later I'm happy to share the result. I think it's one of the few "computer history" books that has tons of code, but correct me if I'm wrong (I wrote this both to tell a story and to learn :-)). My favorite languages are Smalltalk and Lisp, but as an Emacs user, I've been using the latter for much longer and for my…
I made a web game that makes practicing basic arithmetic fun2024 · worchle.com · ▲161Hey, maker here. After launching a daily word search game, I randomly thought of this math game while driving. Finally got around to making it and I think it turned out pretty cool. It’s a math search game that’s meant to help you practice your quick addition, subtraction, multiplication, and division skills. I’m hoping it’ll help people (even those like me who aren’t big on math) learn and increase their speeds. (There are also some settings you can enable to make the game harder) If you try it out, please let me know if you found it fun, if you have anything you’d like me to add, or if you…
I made an interactive math crossword puzzle with infinite levels2024 · scientific.place · ▲165Hey there! I'm the brains behind the math crossword game on my site. This game is all about making math a little more fun – users just drag and drop numbers to fill in the blanks and move on to the next level if they get it right. Let me know if face any issues or have any suggestions! :)
- IMI'm 17 and I created a Forth interpreter for the TI-84+ calculator2018 · ▲56
https://github.com/siraben/ti84-forth Hi HN! For the past year I've been getting into programming in Z80 assembly (especially for the TI-84+). More recently I've been learning about the Forth programming language and after a lot of searching online (in vain) for a Forth interpreter for the TI-84, I decided to write one myself. It's been fun demoing this to others, because it's a very unexpected use of a calculator. It's my largest project to date, and I'm interested to know what the HN community thinks, please feel free to critique my code! -- Ben
More life & fun this month
the category →
A free city-building game in your browser. You are the mayor. You know what the city needs. Now get it past the zoning board, the neighbors, the appeals court and the next election.
Life & fun · 4d ago · permit.petercai.com
- IV
Life & fun · 16d ago · tanzaniaeducationproject.org

Turn a phone, tablet or TV into a sign. Type a message and it fills the screen: welcome signs, timers, Wi-Fi passwords and more. No app, no account, free.
Life & fun · 17d ago · bigwords.page

Play a free virtual guitar online with your keyboard or by touch. Slow songs down and see every chord, string and strum. Acoustic, classic, electric and bass.
Life & fun · 10d ago · guitoro.com

Carrier settings from iPhone, Pixel and Galaxy firmware, decoded and compared: APNs, VoLTE, 5G and Wi-Fi Calling per carrier, and what each build changed.
Life & fun · 15d ago · carrierexplode.com

Life & fun · 24d ago · space.bl2.net
Source: Show HN post ↗
Launched alongside, January 2023
the whole month →
This works suprisingly well. Just give it instructions like "make it winter" or "remove the cars" and the photo is altered. Here are some examples of transformations it can make: Golden gate bridge: https://raw.githubusercontent.com/brycedrennan/imaginAIry/ma... Girl with a pearl earring: https://raw.githubusercontent.com/brycedrennan/imaginAIry/ma... I integrated this new InstructPix2Pix model into imaginAIry (python library) so it's easy to use for python developers.
AI · 2023 · github.com
HyperSwitch▲715Fast, reliable, and affordable open source payments switch
Dev tools · 2023 · hyperswitch.io

The project is called QueryStorm. It uses Roslyn to offer C# (and VB.NET) support in Excel, as an alternative to VBA. I've posted about it before, but a lot has changed since then so figured I'd share an update. The current version includes a host of new features, namely a C# debugger, support for NuGet packages, and the ability to publish Excel extensions to an "AppStore" (which is essentially a NuGet repository). The AppStore can be used by anyone with the (free) runtime component. Another great addition is the community license, which is a free license for individuals and small companies…
Work · 2023 · querystorm.com

Hey HN! Some more info: I’m an NHS doctor and the founder of Pi-A (https://www.pi-a.io) which developed Lungy (https://www.lungy.app). Lungy is an app (iOS only for now) that responds to breathing in real-time and was designed to make breathing exercises more engaging and beneficial to do. It hopefully has many aspects of interest to the HN community – real-time fluid, cloth and soft body sims running on the phone’s GPU. My background is as a junior surgical trainee and I started building Lungy in 2020 during the first COVID lockdown in London. During COVID, there were…
Life & fun · 2023 · lungy.app

