Private Tuitions and Classroom Coaching for all BSC, BTECH, MCA Students
The Best Tutorial Home for Computer Science Students !!
Class Room Coaching and Practical session for all semesters
B.Sc, BTech, MCA, M.Sc
CALL US:

9830546476

8240819346

Corporate Office & Development Centre:
Serampore, Chatra, Kolkata.
EMAIL:
info@mcatutorials.com
Enroll Now!
Enroll now!
Name
Cources
Email
Phone

Code Converters

Numbers are usually coded in one form or another so as to represent or use it as required. For instance, a number ‘nine’ is coded in decimal using symbol (9)d. Same is coded in natural-binary as (1001)b. While digital computers all deal with binary numbers, there are situations wherein natural-binary representation of numbers in in-convenient or in-efficient and some other (binary) code must be used to process the numbers.

One of these other code is gray-code, in which any two numbers in sequence differ only by one bit change. This code is used in K-map reduction technique. The advantage is that when numbers are changing frequently, the logic gates are turning ON and OFF frequently and so are the transistors switching which characterizes power consumption of the circuit; since only one bit is changing from number to number, switching is reduced and hence is the power consumption.

Let’s discuss the conversion of various codes from one form to other.



Binary-to-Gray

The table that follows shows natural-binary numbers (upto 4-bit) and corresponding gray codes.


Code Converters-1

Looking at gray-code (G3G2G1G0), we find that any two subsequent numbers differ in only one bit-change.

The same table is used as truth-table for designing a logic circuitry that converts a given 4-bit natural binary number into gray number. For this circuit, B3 B2 B1 B0 are inputs while G3 G2 G1 G0 are outputs.

K-map for the outputs:



Code Converters-2

Code Converters-3

Code Converters-4

And         G3 = B3



Code Converters-5



Gray-to-Binary

The table that follows shows natural-binary numbers (upto 4-bit) and corresponding gray codes.

Code Converters-6

Looking at gray-code (G3G2G1G0), we find that any two subsequent numbers differ in only one bit-change.

The same table is used as truth-table for designing a logic circuitry that converts a given 4-bit natural binary number into gray number. For this circuit, B3 B2 B1 B0 are inputs while G3 G2 G1 G0 are outputs.

K-map for the outputs:



Code Converters-7

Code Converters-8

Code Converters-9

And         B3 = G3



The realization of Gray-to-Binary converter is



Code Converters-10
Private Tuitions and Classroom Coaching for all BSC, BTECH, MCA Students Private Tuitions and Classroom Coaching for all BSC, BTECH, MCA Students

Map and Driving Directions


Computer Science (Honors/B.Tech) Tutorials

Study Center at SERAMPORE, HOOGHLY,
10 minutes from
Serampore Railway Station or Barrackpore Dhobhi Grat