←back to thread

68 points lemper | 2 comments | | HN request time: 0.41s | source
Show context
dvh ◴[] No.41914112[source]
1+1=3 (for very large values of 1)
replies(6): >>41914192 #>>41914254 #>>41914313 #>>41914375 #>>41914460 #>>41915170 #
bluGill ◴[] No.41914313[source]
I know of 7 different ways to do 1+1 getting 5 different answers. I use most of them in my day to day work as a programmer. Most of the time 1+1=10 because as a programmer I work in binary.
replies(1): >>41915329 #
1. yjftsjthsd-h ◴[] No.41915329[source]
> Most of the time 1+1=10 because as a programmer I work in binary.

Really low level embedded work? Most programming I know about effectively works in base 10 or sometimes hex.

replies(1): >>41916335 #
2. bluGill ◴[] No.41916335[source]
Embedded work - not very low level, but I need to decode a lot of CAN network packets where the individual bits matter. Most of them time I use a hex representation, but that is because hex makes it really easy to figure out the binary going on underneath. Even when I'm doing normal math though it is important to remember that it is binary under it all and so overflow happens at numbers that make sense in binary terms.