numbering system

fnawara

Joined Sep 28, 2010
6
hey all..
i have a problem on converting from octal to decimal and decimal to BCD ....can somebody help me..

tom66

Joined May 9, 2009
2,591
To convert from octal to decimal, multiply each number by 8^(n-1), where n is the position from the right, then sum these terms together.

For example octal "321".

3 * 8^2 = 3 * 64 = 192
2 * 8^1 = 16
1 * 8^1 = 1

192 + 16 + 1 = 209.

To convert from decimal to BCD, just use 4 bits for each digit. For example 29 in BCD is represented as 2 in binary followed by 9 in binary. This becomes 0010 1000, which is literally 2-9.

Markd77

Joined Sep 7, 2009
2,796
The calculator that comes free with windows can convert octal to decimal. Just change the view to scientific.
BCD is best viewed if you convert to hex, then you should see the stored decimal value.

sbombs

Joined Feb 26, 2010
33
To convert from octal to decimal, multiply each number by 8^(n-1), where n is the position from the right, then sum these terms together.

For example octal "321".

3 * 8^2 = 3 * 64 = 192
2 * 8^1 = 16
1 * 8^1 = 1

192 + 16 + 1 = 209.

To convert from decimal to BCD, just use 4 bits for each digit. For example 29 in BCD is represented as 2 in binary followed by 9 in binary. This becomes 0010 1000, which is literally 2-9.
Typo in your post.

1 * 8^1 = 8

should read 1 * 8^0 =1