# Number Systems in Digital Electronics

The digital computer is a digital system that performs various computational tasks. The word digital implies that the information in the computer is represented by variables that take a limited number of discrete values. The count of these limited number is denoted by Base or Radix.

Base – A number system of base or radix “r” is a system that uses r distinct symbols to represent any number

The table below summarizes four number systems, their base and the distinct symbols used by these number systems to represent any number:

 Number System Base / Radix Distinct Symbols Binary 2 0, 1 Octal 8 0 – 7 Decimal 10 0 – 9 Hexadecimal 16 0 – 9, A, B, C, D, E, F

Note: In hexadecimal format, A=>10, B=>11, C=>12, D=>13, E=>14, F=>15

Now let’s take an example of an absolute number and a fractional number and see how to convert from one base to another.

### Convert from Binary to Decimal

1010 = 1*23 + 0*22 + 1*21 + 0*20 = 8 + 0 + 2 + 0 = 10

1010.01 = 1*23 + 0*22 + 1*21 + 0*20 + 0*2-1 + 1*2-2 = 8 + 0 + 2 + 0 + 0 + 0.25 = 10.25

Here 2-1 means ½ and 2-2 means 1/22

(1010)2 = (10)10

(1010.01)2 = (10.25)10

### Convert from Binary to Octal

Since octal is represented using 3 digits (as 8 = 23), assemble the digits in a group of 3 starting from right to left to convert from binary to octal. For fractional part, grouping needs to be done from left to right. Extra zeros should be added to form a group of 3 as shown below:

1010 = 1 010 = 001 010 = 12

1010.01 = 1 010.010 = 001 010.010 = 12.2

(1010)2 = (12)8

(1010.01)2 = (12.2)8

### Convert from Binary to Hexadecimal

Since hexadecimal numbers are represented using 4 digits (as 16 = 24), assemble the digits in a group of 4 starting from right to left to convert from binary to hexadecimal. For fractional part, grouping needs to be done from left to right. Extra zeros should be added to form a group of 4 as shown below:

1010 = 1010 = A

1010.01 = 1010.0100 = A.4

(1010)2 = (A)16

(1010.01)2 = (A.4)16

### Convert from Octal to Binary

12 = 001 010 = 1010

12.2 = 001 010.0100 = 1010.01

(12)8 = (1010)2

(12.2)8 = (1010.01)2

### Convert from Octal to Decimal

12 = 1*81 + 2*80 = 8 + 2 * 1 = 10

12.2 = 1*81 + 2*80 + 2*8-1 = 8 + 2 * 1 + 2/8 = 8 + 2 + 0.25 = 10.25

(12)8 = (10)10

(12.2)8 = (10.25)10

### Convert from Octal to Hexadecimal

Since hexadecimal numbers are represented using 4 digits (as 16 = 24), assemble the digits in a group of 4 starting from right to left to convert from octal to hexadecimal. For fractional part, grouping needs to be done from left to right. Extra zeros should be added to form a group of 4 as shown below:

12 = 001 010 = 00 1010 = 0000 1010 = 0A = A

12.2 = 001 010.010 = 00 1010.0100 = 0000 1010.0100 = 0A.4 = A.4

(12)8 = (A)16

(12.2)8 = (A.4)16

### Convert from Decimal to Binary

To convert from decimal to binary, given number should be divided by 2, until the quotient can not be divided further.

(10)10 = (1010)2

0.25 * 2 = 0. 50 | 0 (Most Significant Digit)

0.50 * 2 = 1. 00 | 1 (MSD)

(0.25)10 = (01)2

(10.25)10 = (1010.01)2

### Convert from Decimal to Octal

To convert from decimal to octal, given number should be divided by 8, until the quotient can not be divided further.

(10)10 = (12)8

0.25 * 8 = 2. 00 | 2 (Most Significant Digit)

(10.25)10 = (12.2)8

### Convert from Decimal to Hexadecimal

To convert from decimal to hexadecimal, given number should be divided by 16, until the quotient can not be divided further.

(10)10 = (A)16

0.25 * 16 = 4. 00 | 4 (Most Significant Digit)

(10.25)10 = (A.4)16

### Convert from Hexadecimal to Binary

A = 1010

(A)16 = (1010)2

A.4 = 1010.0100 = 1010.01

(A.4)16 = (1010.01)2

### Convert from Hexadecimal to Octal

Since octal is represented using 3 digits (as 8 = 23), assemble the digits in a group of 3 starting from right to left to convert from hexadecimal to octal. For fractional part, grouping needs to be done from left to right. Extra zeros should be added to form a group of 3 as shown below:

A = 1010 = 1 010 = 001 010 = 12

A.4 = 1010.100 = 1 010.100 = 001 010.100 = 12.4

(A)16 = (12)8

(A.4)16 = (12.4)8

### Convert from Hexadecimal to Decimal

A = 10*160 = 10 * 1 = 10

A.4 = 10*160 + 4 * 16-1 = 10 * 1 + 4/16 = 10 + 0.25 = 10.25

(A)16 = (10)10

(A.4)16 = (10.25)10

Q. Why we section off 3 bits in Octal and 4 bits in Hexadecimal?

A.As per definition of base given above – A number system of base or radix “r” is a system that uses r distinct symbols to represent any number. Thus, octal with a base of 8, uses 8 distinct symbols (which can be represented by 3 digits as 8=2^3) and hexadecimal with a base of 16, uses 16 distinct symbols (which can be represented by 4 digits as 16=2^4). So as octal is represented using 3 digits, we section off 3 binary numbers starting from right, and as hexadecimal number is represented using 4 digits, we section off 4 binary numbers starting from right.

Q. How to convert any non-decimal number to a number with base x?

A. To convert a number to some other base say x, the procedure is to first convert the number to decimal and then divide it by x repeatedly till the quotient is greater than or equal to x.

Above are the examples of conversions from one base to another and can be utilized to covert any number from any base to any base. Please feel free to leave your footprints in the comments section below for any clarifications to above and anything related to Number System in Digital Electronics.

Hope you find the information presented here useful and informative…!!

1. very nice, this is very good to prepare all conversions in one pleace,thank u very much

• Thanks Murali for stopping by. We intended to make it easy for our readers by consolidating all information at one place. Your feedback reflects it. We really appreciate it..!! Keep visiting Vertical Horizons.

• Hi Kartheek,

Thank you for visiting us. Please let us know if there is any particular problem that you want us to help you with.

We will try to updated the post and provide more examples very soon.

Thanks

• Q. How to convert any non-decimal number to a number with base x?
A. To convert a number to some other base say x, the procedure is to first convert the number to decimal and then divide it by x repeatedly till the quotient is greater than or equal to x.
(144) base 8 = (121) base ?.

• Q. How to convert any non-decimal number to a number with base x?
A. To convert a number to some other base say x, the procedure is to first convert the number to decimal and then divide it by x repeatedly till the quotient is greater than or equal to x.

NEED EXAMPLES OF THIS TYPE PLZ…./

(144) base 8 = (121) base ?.

2. thanxx !! it is very easiest way and its better than our class lecture…

3. thanxxxxxx its very easy now for me to convert……

4. thanx alot….helped me before my class tests..nd i scored gud…thanxxxxxxxxxx……..

5. what is meant by dbm

6. 私は もはや わから あなたがしている 情報、しかし、 良いトピック。 勉強 | いくつかの時間しばらく過ごす|私は必要がありますする必要がある はるかまたはワークアウトより。 ありがとうございますのため優れた 情報 私がした この情報。
1万円以上のご購入で送料無料 即日出荷 http://www.liccy.com/pot-23829-181.html

7. billige ray ban solbriller salg
[url=http://www.minouxi.org/ray-ban-solbriller/]billige ray ban solbriller salg[/url]

8. 素晴らしい ポイント完全に、あなただけの 受信 ブランドの新| |新しい|エンブレムロゴリーダー。 そのあなたは、単に いくつかの日過去の？どれ正？
クリスマス 本物保証 店内全品ポイント10倍 http://www.autodoktor-klein.de/gain-24743-165.html

9. 通常 I しない しかし、ブログに| | ポストの記事を 学ぶ読ん私はしたいと思いこれは、ライトアップと言う、非常に試みることを見てみることをとそれ私は圧力をかけ強制！あなたの文章は私味 びっくりびっくりされています。 ありがとうございます、非常 素晴らしい 記事。
[url=http://www.fuss-informativ.de/sleep-23123-181.html]店内全品送料無料 土日祝も発送[/url]

10. マイ親戚 たびは ここでの私の時間ウェブ、しかし私は取得しています知っている私AMはと言います精通 毎日 楽しい 記事読み取ることにより、 。
セール対象商品 3年保証 http://cours-anglais.info/milk-24920-183.html

11. マイ開発者 | PHPから.NETに移動するために私を納得させる説得しようとしています。 私は常にためのアイデアを嫌っています。しかし、彼は何も少なくtryiongないです。 いくつかのに| WordPressの可動型を私が使用してきた約一年のためのウェブサイトや午前懸念別のプラットフォームへの切り替えについて。 blogengine.net程度のもの、私は素晴らしい良い素晴らしいを聞いたことがあります。すべての私のワードプレス|そこにコンテンツ投稿 |私はインポート転送することができます方法はありますか？ 任意の種類のヘルプは本当にされることになる感謝します！
セール対象商品 大人気定番商品 http://www.tint.lt/tide-24778-210.html

12. ちょっとそこちょうどあなたに素早く頭を与えたいと思いました。 |あなたはテキストの単語 コンテンツにに画面をオフに実行されているように見えるサファリ。問題またはブラウザとは何か|これはフォーマット形式である場合、私はわからないの互換性が、私はを考え出し私はあなたが知っているようにポストと思います。 デザインとスタイルしかし見栄え！すぐに固定 | 問題問題あなたが得る願っています。 乾杯
人気通販 完売これで最後 http://amawards.org/milk-23337-181.html

13. こんにちは！ 言う私は素早く叫びを与え、したかったので、ここでコメント|これは私の第1は、あなたの投稿。同じ対処越える他のブログ/ウェブサイト/フォーラム被験者 |あなたはお勧めを示唆していることができますか？ あなたの時間をありがとう！
完売これで最後 ポイント10倍 http://greenerway.bt/mouse-24946-183.html

14. アメージング！その実際 素晴らしい 段落、私が持っている多くの明確な考えについてこの執筆の作品から。
2015春夏新色追加 レビューを書いて送料無料 http://autismtomorrow.com/store-25362-162.html

15. 私は詳細を確認したいのですが、あなたは私たちにこのについての詳細を教えてもらえますか？ いくつかの追加情報の詳細を見つけるために、のように注意して私は思います。