Binary-Coded Decimal, or BCD, is the most obvious way to encode a positionally-represented decimal number in binary: literally, 1234 becomes 0x1234. The some of the earliest of early computers used this representation, and the SMS protocol still uses it for some ungodly reason. It also has a more sane role as the expanded version of the DPD encoding for IEEE 754-2008 decimal numbers. Continue reading Fast Binary-Coded Decimal Addition and Subtraction

# All posts by Tavian Barnes

# PlayStation 3 Keys

It seems that geohot and the members of the group fail0verflow, who found (and in geohot's case, published) many of Sony's private signing keys for the PS3 console, are being sued by Sony. I could rant for a while about how everything they've done is perfectly legal, and how stupid the DMCA is (I probably will in the future), but actions speak louder than words, so here are the keys that geohot published before he took them down: Continue reading PlayStation 3 Keys

# Facebook Hacker Cup Qualification Round: Double Squares

Facebook has decided to hold a programming competition, I guess. They should definitely hire the winner, and get her to *rewrite their damn programming competition interface*. But more on that later. Continue reading Facebook Hacker Cup Qualification Round: Double Squares

# Righteous hack: getting 2^{63} - 1 points in a silly Facebook game

Security through obscurity doesn't work. Every once in a while I like to prove this fact, by getting worldwide high scores on vulnerable leaderboards. The first time I did this was to Area Flat 3 (which was an awesome game when I was in elementary school, and is still pretty fun). Check the all-time top 100 scores for H4X0R (I know, not very original; I was 13, sue me). But that hack was child's play compared to this one. Continue reading Righteous hack: getting 2^{63} - 1 points in a silly Facebook game

# Solving Cubic Polynomials

Although a closed form solution exists for the roots of polynomials of degree ≤ 4, the general formulae for cubics (and quartics) is ugly. Various simplifications can be made; commonly, the cubic \(a_3\,x^3+a_2\,x^2+a_1\,x+a_0\) is transformed by substituting \(x = t-a_2/3a_3\), giving Continue reading Solving Cubic Polynomials

# Solving Polynomials

A well known (if not by name) theorem is the Abel–Ruffini theorem, which states that there is no algebraic expression for the roots of polynomials with degree higher than 4.

A not-so-well-known fact is that for any polynomial \(P(x)\), it is possible to find (with exact arithmetic) a set of ranges each containing exactly one root of \(P(x)\). One such algorithm is due to James Victor Uspensky in 1948. Continue reading Solving Polynomials

# .com

Hell is freezing over. Or something. This month I've created a twitter and now a blog-type thing here. Welcome to 2006, I know.