Docsity

implementation of binary to gray and gray to binary conversion, Study notes of Computer Architecture and Organization

Partial preview of the text

Download implementation of binary to gray and gray to binary conversion and more Study notes Computer Architecture and Organization in PDF only on Docsity!

Code Conversion Binary to Gray Gray to Binary

Operating Manual Ver.1.

An ISO 9001 : 2000 company

94-101, Electronic Complex Pardesipura, Indore- 452010, India Tel : 91-731- 2570301/02, 4211100 Fax: 91- 731- 2555643 e mail : [email protected] Website : www.scientech.bz Toll free : 1800-103-

Introduction

DB06 is a compact, ready to use Code Conversion (binary to gray & gray to Binary) experiment board. This experiment board has been designed to study code converters used for translating from code to code. It can be used as stand alone unit with external power supply or can be used with Scientech Digital Lab ST2611 which has built in power supply, pulse generator, pulser switches, 8 bits data switches, logic probe, digital display, 8 bits LED display.

List of boards : Model Name DB01 Logic Gates DB02 Universal Gate- NAND/NOR DB03 EX-OR Gate Implementation DB04 Demorgan's Theorem DB05 EX-OR Gate Application DB07 Code Conversion (BCD to Excess-3 code) DB08 Binary Adder -Subtractor DB09 Encoder โ€“ Decoder DB10 Multiplexer โ€“ Demultiplexer DB11 Flip-Flops (R-S, D, J-K, T) DB12 Shift Register (4 bit SIPO) DB13 4 Bit Synchronous Binary Counter DB16 Digital to Analog Converter (R-2R ladder) DB15 BCD to 7- Segment Decoder DB17 3 Digit Event Counter DB21 Fiber Optic Digital Link DB22 Analog to digital converter (Counter Type) DB27 Digital to Analog Converter (R-2R ladder) DB28 Monostable Multivibrator DB29 CMOS and Crystal Oscillator DB30 Adder/ Subtracter (4-Bit/8-Bit) DB31 Decoder/Demultiplexer DB32 Modulo-N programmable counter DB35 4 BIT Shift Register โ€ฆโ€ฆโ€ฆand many more

Theory

The availability of a large variety of codes for the same discrete elements of information results in the use of different codes by different digital system. It is sometimes necessary to use the output of one system as the input to another. A conversion circuit must be inserted between the two systems if each uses different codes for the same information. Thus, a code converter is a circuit that makes the two systems compatible even though each uses a different binary code.

The binary number system is a system that uses only the digits 0 & 1 as codes. To represent a group of 2n^ distinct element in a binary code requires a minimum of n bits. This is because it is possible to arrange n bits in 2n^ distinct ways. Although the minimum number of bits required to code 2n^ distinct quantities is n, there is no maximum number of bits that may be used for binary code. For example, a group of four distinct quantities can be represented by a two bit code, with each quantity assigned one of the following bit combinations: 00, 01, 10, and 11. A group of eight elements requires a three bit code, with each element assigned to one and only one of the following 000, 001, 010, 011, 100, 101, 110, and 111. (Refer table 1).

Gray code (reflected code) is shown in Table 1. Number in the gray code changes by only one bit as it proceeds from one number to the next. For example in going from decimal 7 to 8, the gray code number changes from 0100 to 1100; these number differ only in MSB. So it is with the entire gray code; every number differs by only one bit from the preceding number. The logic diagram for binary code to gray code converter and gray code to binary code converter is shown in fig. 1 and fig. 2.

Experiment Objective : To study and verify the code conversion circuits.

**1. Binary to Gray Code

  1. Gray to Binary Code**

Apparatus required :

1. Digital board DB. 2. DC Power Supply +5 V from external source or ST2611 Digital lab. 3. Digital Multimeter or Digital Lab ST.

Logic diagram & Truth Table :

(Logic 1 = +5V & Logic 0= GND)

Binary to Gray Code Gray to Binary Code

Fig. 1&

Decimal B3 B2 B1 B0 Decimal G3 G2 G1 G

0 0 0 0 0 0 0 0 0 0

1 0 0 0 1 1 0 0 0 1

2 0 0 1 0 2 0 0 1 1

3 0 0 1 1 3 0 0 1 0

4 0 1 0 0 4 0 1 1 0

5 0 1 0 1 5 0 1 1 1

6 0 1 1 0 6 0 1 0 1

7 0 1 1 1 7 0 1 0 0

8 1 0 0 0 8 1 1 0 0

9 1 0 0 1 9 1 1 0 1

10 1 0 1 0 10 1 1 1 1

11 1 0 1 1 11 1 1 1 0

12 1 1 0 0 12 1 0 1 0

13 1 1 0 1 13 1 0 1 1

14 1 1 1 0 14 1 0 0 1

15 1 1 1 1 15 1 0 0 0

Binary Code Gray Code Table. 1&

Datasheet

Quad 2- Input Exclusive-OR Gate 54LS/74S

Pinout diagram

(Pin 14 = Vcc = + 5 V)

Function Table

H = High voltage level L = Low voltage level

Note : Pull up resistance of 1 k is required in open collector ICs to get output.

Warranty

1. We guarantee the product against all manufacturing defects for 24 months from the date of sale by us or through our dealers. Consumables like dry cell etc. are not covered under warranty. 2. The guarantee will become void, if

a) The product is not operated as per the instruction given in the operating manual. b) The agreed payment terms and other conditions of sale are not followed. c) The customer resells the instrument to another party. d) Any attempt is made to service and modify the instrument.

3. The non-working of the product is to be communicated to us immediately giving full details of the complaints and defects noticed specifically mentioning the type, serial number of the product and date of purchase etc. 4. The repair work will be carried out, provided the product is dispatched securely packed and insured. The transportation charges shall be borne by the customer.

For any Technical Problem Please Contact us at [email protected]

List of Accessories

1. 2mm patch cord. (Red) 16โ€ ......................................1 No. 2. 2mm patch cord (Black) 16โ€ ....................................1 No. 3. 2mm patch cord (Blue) 16โ€.................................... 8 Nos. 4. e-Manual .................................................................1 No.

Updated 18-05-