Dotnet Framework Questions And Answers_0

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Dotnet Framework Questions And Answers_0 as PDF for free.

More details

  • Words: 230
  • Pages: 3
Special binary codes have been designed to represent decimal numbers. These codes are used extensively in digital logic applications (e.g. arithmetic circuits, encoders, decoders and code converters), and in computer communication applications to provide error detection and correction.

The 8421 Binary Decimal Code: In this code structure, each of the decimal digits (0-9) is represented by a four-bit binary code as illustrated in Table 2-8. Recall that with 4 bits the number of unique representations is 24=16. Thus there are 6 invalid four-bit combinations for the BDC code.

Decimal

BCD

0

0000

1

0001

2

0010

3

0011

4

0100

5

0101

6

0110

7

0111

8

1000

9

1001

Invalid Combinations 1010 1011

1100 1101 1110 1111 Table 2-8 BCD code

Examples: Convert each of the decimal numbers below to BCD A) 546 10 B) 23.8 10 C) 5139 10

A) 5 = 0101, 4 = 0100, 6=0110 thus 546 = (010101000110)

BCD

B) 23.8 = (00100011.1000) BCD C) 5139 = (0101000100111001) BCD

Converting BCD codes to decimal To convert BCD codes to decimal, break the binary digits into groups of four starting from the binary point and convert each group into its appropriate BCD digit.

Examples: Convert each of the BCD numbers below to their decimal equivalent A) 001110000111

B) 01100111.0100

A) (001110000111) BCD = 0011 1000 0111 = (387) 10 B) (01100111.0100) BCD = 0110 0111. 0100

Related Documents

Dotnet Framework
November 2019 43
Dotnet Framework
November 2019 31
Dotnet Framework
May 2020 19
Dotnet Framework
November 2019 27
Dotnet Framework Faq
November 2019 26