Binary Numbers - Page 1
Forum section: electronics / beginners

author: v2rocketboy
author_rank: Newbie
timestamp: August 08, 2010, 11:29:11 am
content: Hi all, I'm currently doing a course at uni that involves a lot of binary numbers, logic etc, and im a bit confused with it all cause they way i learn is things is by know what they do in the big picture.We being taught how to represent negatives numbers in signed, ones complement, twos complement ,excess 128 and what i want to know is where these formats actually originated from ie the history behind there developments? If anyone knows the answer please reply.By the way, great job on the new online radio show, the amp hour, its great that two intelligent individuals can join forces to provide knowledge to millions via the internet.Cheers, v2rocketboy

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 08, 2010, 11:42:34 am
content: The origin of most of these is hardware - formats were designed in the days when computing hardware was expensive, so formats were chosen around what was easiest to implement.For example with 2's complement numbers, the format is such that you can add and subtract them without worrying about the signs - it just works out righte.g. -1+211111111 + 00000010 = (1)00000001 - the (1) carry falls out the end and you ignore it.Other formats are designed around their application - e.g. Digital signal processors sometimes use 'saturation' arithmatic, which on an overflow, 'end-stops' at the highest value instead of rolling over, as this makes more sense when dealing with real-world analogue values - slight clippiing is generally more sensible than a sudden chnage to a vastly different value due to an overflow wrapping round.A similar example is gray coded binary, which is designed so that only one bit changes at a time as you count up or down, typically used for things like rotary encoders, to avoid false codes at the transition between 2 values.

author: Zero999
author_rank: Super Contributor
timestamp: August 08, 2010, 02:12:54 pm
content: My advice would be is to look at how hardware processes binary numbers, start with the adder circuit.http://en.wikipedia.org/wiki/Binary_adder

author: Mechatrommer
author_rank: Super Contributor
timestamp: August 08, 2010, 04:04:53 pm
content: i just simply accept that, even always going back to the book notes to refresh the standard as i always forgeti trust, its has been designed so, that it will works allright and efficiently. what i do care most is my program is working all right, semanticallyi just wonder how this binary things go into harmony.this -ve numbers is still simpler logic. 16,32,64 bits real numbers in binaries are enuf to make my brain spinning with its mantissa and exponent. but i guess the reason is the same... hardware and implementation issue.ps: quoted from a mathematician that i cant remember who: solving the equation is the small part, finding the right "symbol" is the big part... more or less like that

author: v2rocketboy
author_rank: Newbie
timestamp: August 08, 2010, 11:35:34 pm
content: awesome!! that makes complete sense now, thank-you very much to all that replied it is greatly appreciated!!

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 09, 2010, 12:50:58 am
content: Just remember that for N bits, there are 2^N possible permutations. What you use the bits to represent is up to you. You could have one byte count from 0 to 255, 1 to 256, or -128 to 127. You can also use the bits to represent quantities other than numbers. What a given bit pattern means is up to you, but you would generally choose something that makes for a simple hardware implementation.