# BINARY CODES PPT

Views:

Category: Education

## Presentation Description

Different types of Codes Alphanumeric Codes a) ASCII b)EBDIC Error Detecting Codes Numeric Codes a) Weighted Codes;- BCD , Biquinary Codes b) Non Weighted Codes;- Gray Codes, Excess 3 Codes

## Presentation Transcript

### BINARY CODES:

BINARY CODES Prashant Tahiliani 10MUBEEE083

### Introduction:

Introduction Binary Code was first introduced by the German mathematician and philosopher Gottfried Wilhelm Leibniz during the 17th century while he was trying to find a system that converts logic’s verbal statements into a pure mathematical one. A binary code is a way of representing text or computer processor instructions by the use of the binary number system's two-binary digits 0 and 1

### Types of Binary Codes:

Types of Binary Codes

### Numeric Codes:

Numeric Codes In computing and electronic systems, binary-coded decimal ( BCD ) is a digital encoding method for numbers using decimal notation, with each decimal digit represented by its own binary sequence. In BCD, a numeral is usually represented by four bits (8,4,2,1)  which, in general, represent the decimal range 0 through 9. DECIMAL DIGIT BCD 8 4 2 1 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 Weighted Codes 1). Binary Coded Decimal (BCD)

### 2). Biquinary Codes:

2). Biquinary Codes Bi- quinary coded decimal is a numeral encoding scheme used in many abacuses and in some early computers, including the Colossus. The term bi- quinary indicates that the code comprises both a two-state ( bi ) and a five-state ( quin ary ) component. To decode the Biquinary code use the number 5043210. At each digit multiply the biquinary number by the number 5043210. This will give you one decimal digit. For example take the number 0110000. To change this into decimal: (5 × 0) + (0 × 1) + (4 × 1) + (3 × 0) + (2 × 0) + (1 × 0) + (0 × 0) = 4

### B. Non-Weighted Codes:

B. Non-Weighted Codes The excess -3 code , abbreviated a XS-3 , is an important 4- bit code sometimes used wit binary-coded decimal (BCD) numbers. It possesses advantages in certain arithmetic operations. The excess-3 code for a decimal number can be obtained in the same manner as BCD except that 3 is added to each decimal digit before encoding it in binary. XS-3 CODE= BCD+3 . Eg :- ( 75 ) Decimal =( 01110101) BCD = ( 10101000) XS-3 1). Excess – 3 Code DECIMAL DIGIT BCD 8 4 2 1 XS-3 (BCD + 3) 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 0 0 2 0 0 1 0 0 1 0 1 3 0 0 1 1 0 1 1 0 4 0 1 0 0 0 1 1 1 5 0 1 0 1 1 0 0 0 6 0 1 1 0 1 0 0 1

### 2).Gray Code:

2).Gray Code It belongs to the class of codes called minimum-change code, in which only one bit in the code group changes when going from one step to next. There is no specific weights assigned to the bit position . It finds application in input/ output devices ,switching systems and some type of analog to digital convertors. Conversion from Binary to Gray code Binary :- 0 + 1 + 1 + 0 EX-OR EX-OR Gray :- 0 1 0 1 Conversion Gray to Binary code Gray :- 0 0 0 1 MSB Binary :- 0 0 0 1 MSB EX-OR

### Alphanumeric Codes:

Alphanumeric Codes The American Standard Code Information Interchange, or ASCII, uses a 7 bit binary code to represent text within a computer, communications equipment, and other devices that use text. Each letter or symbol is assigned to a number from 0 to 127. For example, in the 8-bit ASCII code, a lowercase "a" is represented by the bit string 01100001. ASCII Code

### II. EBDIC Code:

II. EBDIC Code Extended Binary Coded Decimal Interchange Code (EBCDIC) is an 8-bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems. 