Arrow

/ Instrumentation

Binary Codes in Digital Electronics:

Binary codes are combinations of 0s and 1s used to represent alphabets, numbers, symbols, etc. These codes are an essential part of any digital system such as computers, phones, and television. In short, binary codes are extensively used in communication and information systems. The main reasons for the wide use of binary codes include the following reasons:

In digital technology, only two switching states, viz., ON (0) and OFF (1), are available to represent alphabets and numerals. However, the bits 0 and 1 can represent only four (00, 01, 10, and 11) letters or numbers. It can be seen that these four combinations of bits are not sufficient to represent various languages and number systems. For example, English language requires a minimum of 26 different combinations of bits to represent its alphabets. It can be seen that a 5-bit binary coding scheme can produce 25 = 32 different combinations of 1s and 0s and hence such a 5-bit coding scheme can be used to represent the 26 letters from a to z in English language. In such a coding scheme, as an example, 00001 may be used to represent letter a, 00010 may be used to represent letter b, and so on.

By using error-detecting and correcting codes, errors in received bits produced by the noise existing in transmission channels can be detected. Once the errors are detected, they can be corrected using error-correcting codes. These error-detecting and correcting codes thus ensure exact (or approximately exact) reproduction of signals transmitted from distant channels.

Data-compression codes help to transmit large amounts of data in very short duration of time.

Data encrypting codes help to send secret data over transmission channels.

Coding helps to achieve maximum efficiency in signal transmission.

Signals/data from several transmitting sources can be sent through a single channel using multiplexing techniques. This ensures great economy in signal transmission.

Operations of modern smart instruments and equipments (such as smart phones) depend on binary codes for their smartness.

Artificial intelligence depends heavily on binary codes for their implementation.

Binary codes help in the artificial generation of speech and video signals.

Codes form the basis of many computers operations such as picture and sound enhancement, picture morphing, animation, etc.

Binary Codes Classification

At present, a large variety of binary codes are available for different applications in digital technology. Some of these codes are used for source coding (encoding of spoken and written languages for data transmission). Some others are used for channel encoding, which will help to detect and correct noise-generated errors in received signals. Data compression codes help to transmit huge amount of data in a short span of time. Similarly, data encryption codes help to achieve secrecy in data transmission. There exist several more binary codes for various other applications. In this section, we shall discuss the most commonly used binary source codes such as Morse code, Shannon-Fano code, Huffman code, Baudot code, ASCII code and EBDIC.

The first known binary source code is the Morse code, invented by Samuel Morse in 1837. It was used in his telegraph system to send messages over wired channels. Morse code is an uneven code in the sense that the codes used to represent letters and numerals differ in their length. For example letter A is represented by a dot followed by a dash. But letter B is represented by a dash and three dots. Baudot code, invented Emile Baudot in 1870, is an even-length code; all the codes in this scheme has the same length of 5 bits each. It can be seen that a 5-bit scheme has only 25 = 32 codes to represent a given language. As time passed on, demand for more binary combinations became a necessity and this led to the invention of the ASCII code and the EBCDIC. The classification of Binary Codes in Digital Electronics are as follows,

1. Alpha-Numeric Codes
2. Morse Code
3. Baudot Code
4. ASCII Code
5. Extended Binary-Coded Decimal Interchange Code

Hexadecimal to Binary Conversion Examples

In the case of octal to binary conversion, we had used groups of 3 bits for conversion purposes. This was based on the concept that radix of octal system is 8 = 23. The exponent 3 formed the basis of 3-bit group selection. Extending this principle, we use groups of 4 bits each the case of hex since its radix is 16 = 24.. Example 14 will illustrate the procedure of hex to binary conversion.

Example 14: Find the binary equivalent of the hex number E73.

Solution: For the desired conversion, we prepare Table 1.12 based on the principle described in the case of octal to binary conversion. Note that commas are used to identify the groups in the last row.

Table 1.12 Hex-Binary conversion


Given hex number
E
7
3
Binary equivalent of hex in each column
1110
0111
0011
Binary equivalent of E73
1110,0111,0011  1010011

From Table 1.12, we get the desired answer:

(E73)16 = (111001110011)2

Binary to Hexadecimal Conversion Examples

In the case of octal-binary conversion, we had used 3-bit groups. Following this concept, we use 4-bit groups for hex-binary conversion. Example 15 will illustrate the procedure.

Example 15: Convert binary number 11110100010 into equivalent hex number.

Solution: To solve the given problem, we prepare Table 1.13. In this case also, we use commas to separate the 4-bit groups and add padding bit (0) as the first bit in the first group of 111 to make it into a 4-bit group.

Table 1.13 Binary-hex conversion


Given binary number separated into 43-bit groups
0111,1010,0010,0110
Bits in groups
0111
1010
0010
0110
Corresponding hexl numbers
7
A
2
6
Hex equivalent of the given binary number
7A26


From Table 1.13, we get the desired answer:

(111 1010 0010 0110)2 ≡ (7A26)16


Conversion of Decimal to Hexadecimal Numbers

Example 12: Convert decimal number 312 to its hexadecimal equivalent.

Solution: As in the previous cases, here also we prepare the decimal-hex conversion table, which is illustrated in Table 1.10. Inspection of the result given below proves that a larger decimal number is reduced to a smaller hex number; this fact points to the compact nature of hex numbers compared to decimal numbers.
From Table 1.10, we get

(312)10 ≡ (138)16­

Hexadecimal Fraction

Example 13: Convert decimal fraction 0.28125 into equivalent hexadecimal fraction.

Solution: Table 1.11 illustrates the desired conversion.

From Table 1.11, we get:

(0.28125)10 ยบ (0.48)16


Octal fractions can be obtained in the same fashion as binary fractions by adopting the procedures developed for the case of binary fractions.

Example 10: Convert the octal fraction 0.352 to equivalent decimal fraction.

Solution: Using the basic definition of fractions, we get

(0.352)8 = 3 ´ 8–1 + 5 ´ 8–2 + 2 ´ 8–3    


Conversion of Decimal Fraction into Octal Fraction

Example 11: Convert the decimal number 83.44 into its equivalent to octal number.

Solution: The conversion is done as shown in Table 1.9, which is the combined integer-fraction table; integer part is towards the left and fractional part is towards right.  In the tabular form shown, we have divided the number into its integral and fractional parts.


From Table 1.9, we get the desired answer as

(83.5625)10 ≡ (123.44)8

Octal Number System: 

In the octal number system, the base or radix is 8 and we have digits from 0 to 7 as its basic elements. For example, 127 is a valid octal number. But 128 is an invalid number in the octal system.

Conversion of a Decimal Number into Its Equivalent Octal Number

Example 7: Convert decimal number 83 into its equivalent octal number.

Solution: We prepare the decimal-octal conversion table as illustrated in Table 1.6, based on the discussions in Section 1.4.2.
From Table 1.6, we get
                                                                     (83)10 = (123)8
Conversion of Octal Number into Equivalent Binary Number

To convert an octal number into binary, we first convert it into its equivalent decimal number, which is then converted into its equivalent binary number. This procedure is illustrated using Example 8.

Example 8: Consider the octal number (123)8. Its decimal equivalent number was obtained in Example 6 as (83)10. We can convert (83)10 into binary as described in Section 1.4.2. However, we can perform the conversion using yet another simpler method. In this process, we divide 83 as the sum of the set of decimal numbers, which are powers of 2. For example, we have seen that 20 = 1, 21 = 2, 23 = 8, and so on. Using this principle, we now decimate 83 into powers of 2 as follows:                                                                        

                                 83 = 64 + 16 + 2 + 1

Now, it is very easy to convert this decimated numbers into equivalent binary. Thus

           (83)10 = 1 ´ 26 + 1 ´ 24 + 1´21 +1´20 = (1010011)2

The above procedure is lengthy and time consuming. There is an easy and faster method to convert octal numbers into binary numbers. For this, first we prepare the octal-binary conversion table, Table 1.7 as shown below. The octal number is then entered in the topmost cells of table. Then its 3-bit binary equivalents are written into the cells in the second row of the table. Finally, we remove the barriers in the table cells and write the combined bits in the third row of Table 1.7, as shown, which gives the desired answer. Commas are used in the last row to identify binary groups.

Given octal number

1
2
3
Binary equivalents

001
010
011
(123)8

(001 010 011)2

From Table 1.7, we get the desired answer as

   (123)8 = (001010011)2 = (1010011)2

From Example 8, we find that it is very easy to convert octal number to binary.  Similarly, the reverse process also is very fast. For this, we divide the binary numbers into groups of 3 bits each, starting from the right-most bit and then write the corresponding decimal number below these groups.  The final answer will be the octal equivalent of the binary.

Example 9: Find the octal equivalent of (11110100010)2.

Solution: Proceeding as described above, we first prepare the binary-to-octal conversion table, designated as Table 1.8. To draw the columns of this table, we first count the number of bits in the given binary number and then divide it by 3. In the given problem, we have 11 bits. This means that there are three groups of 3 bits each. The remaining two bits form the fourth group. It may be noticed that the grouping process starts from the rightmost three bits, and continue in the left direction. We may separate the groups by using commas as given below:

                                                            11, 110, 100,010

After having decided the groups and its member bits, we draw Table 1.8 and make entries in it as shown. We first enter the given binary number in the first row of Table 1.8. In the second row, we make entries of the groups in their respective cells. It may be noticed that the first cell in this row contains only two bits. To make it into a 3-bit group, we add a 0 (shown in bold font) as its starting bit, so that the given binary number now reads as  011, 110, 100,010. It is clear that this 0 has no significance; it is only added as a padding bit to form a 3-bit group.

After completing the entries in second row of Table 1.8, we proceed to make entries in the cells of the third row. In the cells of this row, we write the decimal equivalent number below each 3-bit group of row two. Thus, below the rightmost group of 010, we enter in row three its decimal equivalent number 2. Continuing this operation, we enter 4 below the group of 100, 6 below 110, and 3 below 011, as shown. In the fourth row of Table 1.2, we combine the digits of row 3 to yield the octal number 3642 as the equivalent of the binary number 11110100010.

It may be noted that the explanation given above is quite lengthy; however, its implementation can be seen to be very fast because there is no need for any lengthy explanations in drawing Table 1.8. Once the principles are clear, drawing Table 1.8 is easy.

                                                        Table 1.8 Binary-Octal conversion
Given binary number separated into 3-bit groups
                 011,110,100,010
Bits in groups
011
110
100
010
Corresponding octal numbers
3
6
4
2
Octal equivalent of the given binary number
                 3642


From Table 1.8, we get the desired answer as

(11110100010)2 = (3642)8

Example 10: Find the binary equivalent of the octal number (4321)8.


Solution: Table 1.2 shows the desired octal-binary conversion table. From table 1.2, we get the desired answer as:

(4321)8 = (100011010001)2

Table 1.2 Octal-Binary conversion table

Octal number
4
3
2
1
Cell binary
100
011
010
001
Binary equivalent of given octal number
100 011 010 001


Example 6: Convert the decimal number (26.012) into equivalent binary number.

Solution: We first convert 26 into binary whole number, and then (0.012)10 into binary fraction.  This is done as shown in Table 1.4.

From table 1.4, we obtain the binary equivalent of decimal number 26 as 11010. Next, we consider the fractional part. This is done as shown in Table 1.5. From Table 1.5, we find that the binary equivalent of decimal fraction 0.6875 is 0.1011.


Combining the integer and fractional parts, we get

(26.6875)10  = (11010.1011)2


Applications of MRI:

1. Diffusion MRI measures the diffusion of water molecules in biological tissue
2. Magnetic Resonance Angiography (MRA) is used to generate pictures of arteries in order to analyze their working and abnormalities.
3. Functional MRI measures signal changes in the brain that are due to changing neural activity.
4. In clinical applications, MRI is used to distinguish pathologic tissues such as brain tumor from normal tissues.
 5. An MRI scan can be used as an extremely accurate method of disease detection throughout the body.
6. Neurosurgeons use an MRI scan in order to define brain anatomy and to evaluate the integrity of the spinal cord.
7. It provides valuable information on glands and organs within the abdomen.

Advantages of MRI over CAT:

1. The most important advantage of MRI scan is that it is proved to be harmless to the patients.
2. It uses a strong magnetic field and non-ionizing radiation in the RF range.
3. MRI provides good contrast resolution than CAT scanning. The contrast resolution is the ability to distinguish the differences between two arbitrarily similar but not identical tissues.
4. In MRI by variation of scanning parameters, tissue contrast can be altered and it can be changed in various ways to detect different features.
5. MRI machines have the ability to change the imaging plane without moving the patient.
6. As the MRI scanning does not use ionizing radiation, it is best suited for cases when a patient is to undergo the test several times successively.
7. The brain, spinal cord and nerves are seen much more clearly with MRI scan


It is a nuclear medicine imaging technique that produces a 3D image or picture of functional processes in the body. A positron emitting radionuclide (tracer) is introduced in the body. PET system detects a pair of gamma rays emitted from the tracer 3D images of tracer concentration within the body are then constructed by computer analysis. Commonly the biologically active module chosen for Positron Emission Tomography (PET) Scan is fluorodeoxyglucose (FDG) which is an analogue of glucose.

Operation in detail:

Before conducting the scan, a short lived radioactive tracer isotope is injected into the living subject.The tracer is chemically incorporated into a biologically active molecule. The molecule most commonly used for this purpose is FDG. There is a waiting period while active molecule becomes concentrated in tissues of interest. Then the subject is placed in the imaging scanner (usually one hour). During the scan a record of tissue concentration is made as the tracer decays.

As the radioisotope undergoes positron emission decay, it emits a position. Positron is an antiparticle of the electron with opposite charge. The emitted positron travels in the tissue for a short distance. This distance is typically dependent on the isotope. During this travel, the positron loses its kinetic energy until it decelerates to a point. At this point it can interact with an electron. The encounter annihilates both electron and positron producing a pair of annihilation (gamma) photons is detected when they reach a scintillator in the scanning device creating a burst of light. A photomultiplier tube or Si APD will detect this light. The PET technique depends on the simultaneous or coincident detection of the pair of photons moving in opposite direction.

Localization: 

The gamma photons are emitted at almost 180 degrees to each other and hence it is possible to localize their source along a straight line of coincidence (called line of response or LOR). In practice the LOR has a finite width. If the resolving time of detectors is less than 500 picoseconds, it is possible to localize the event.

Image reconstruction: 

The PET scanner collects a list of coincidence events which represent the simultaneous or near simultaneous detection of annihilation photons by a pair of detectors.
The PET data suffer from scatter and random events much more dramatically than CT. In practice considerable preprocessing of data is required for the correction of random coincidences, estimation and subtraction of scattered photons etc. A common method used to reconstruct images from projections is Filtered Back Projection (FBP). This algorithm is simple and has a low requirement for computing resources. Another method of reconstruction is iterative expectation -maximization algorithms.


The PET imaging technique is shown briefly in the figure. From the figure we can see that the coincidence detection unit is one of the major units of the PET imaging system.

Attenuation Correction:  

Since different LORs must traverse different thicknesses of tissue, the photons are attenuated differentially. As a result the structure deep in the body may be reconstructed falsely. For more faithful representation, the attenuation-corrected images are commonly used.

2D/3D Reconstruction  

Modern PET scanners have multiple rings of detectors.

We can use two approaches in reconstructing data from such a scanner.

1) Trace each ring as a separate entity so that only coincidences within a ring are detected. Here the image from each ring can then be reconstructed individually. It is 2D reconstruction.

2) In another method coincidences detected between rings and within rings. The entire volume is reconstructed to form 3D.

Typically Positron Emission Tomography (PET) Scan imaging utilizes a dedicated PET camera system which consists of multiple rings of detectors. The Positron Emission Tomography Scan detectors consist of scintillation crystals coupled with photomultiplier tubes. The scintillation crystals commonly used in PET imaging is BGO (Bismuth Germanium Oxide. The basic concept behind ring design is that the two photons detected in close temporal proximity by two opposed detectors in the ring are likely to have originated from a single annihilation event in the body. Such a simultaneous detection is called coincidence.


MRI Introduction:

Magnetic Resonance imaging or Nuclear Magnetic Resonance (NMR) is a medical imaging technique which is commonly used in radiology to visualize the internal structures and functions of the body. An MRI scan is a technique that uses magnetism, radio waves and computers to produce images of body structures. Unlike other imaging techniques it uses a powerful magnetic field to align the nuclear magnetization of hydrogen atoms in water in the body. It provides high quality 2-D or 3-D images of organs without using X-rays or any other radiations.

Magnetic Resonance Imaging Scan Test

The magnet creates a strong magnetic field that aligns the protons of hydrogen atom, which are then exposed to a beam of radio waves. The technique is based on the principle that when the hydrogen atoms of water molecule are subjected to a strong magnetic field hydrogen atoms release protons. That is when a person goes inside the powerful magnetic field of the scanner, the magnetic moments of these protons align with the direction of field. The magnet is the largest and most expensive component of the scanner. Different magnets such as permanent magnet, resistive electromagnet, superconducting electromagnet etc can be used. Magnetic field strength is also an important factor because as the magnetic fields increases the signal-to-noise ratio also increase which results in higher resolution of the image. An RF electric field is then turned on which causes the protons to change their alignment relative to the field. Again when this field is turned off the protons return to the original magnetization alignment. By applying additional magnetic field during scanning, the position of protons in the body can be determined and it allows an image of the body to be created on the computer. MRI can be particularly used in detecting tumors in tissues because the protons in different tissues return to their equilibrium state at different rates. By manipulating the return rate, the affected tissues can be distinguished. An MRI scan is a pinless radiology technique that avoids the terror of X-ray radiation exposure.

The MRI scanner cutaway is shown.

The different components of the MRI system are briefly explained below.

1. Magnet: In MRI system there is a magnet which is provided for a strong uniform steady magnetic field. Now superconducting magnets are used commonly. The superconducting magnets can provide better Signal-to-noise ratio and better image quality than the output obtained through conventional magnets.

2. RF coils: Different RF coils used are
1) Surface coil. 2) Paired saddle coil. 3) Helmholtz pair coil. 4) bird cage coil

Surface coils are the simplest which are commonly used for spines, shoulders and other relatively small body parts.

Paired saddle coils are commonly used for imaging of knee. These are also used for the xand y gradient coils.

The Helmholtz pair coils consist of two circular coils parallel to each other. They are commonly used as the z gradient coils in MRI scanners.

The fourth type bird cage coil can provide the best homogeneity of all the RF coils. The name implies that it has the appearance of a bird cage. This coil is commonly used as the transceiver coil for the imaging of head.

3. Gradient coils: Gradient coils are of so importance as they are used to produce deliberate variations in the main magnetic field. There are usually three sets of gradient coils one for each direction. We have to vary the magnetic field because it permits the localization of image slices, phase encoding, frequency encoding etc. Changing magnetic field induce electrical currents in the conductor.

The block diagram of MRI hardware is shown below.



Popular Posts

About the Contributor

Dr B Somanathan Nair

Dr. B Somanathan Nair, one of the top engineering text author of India. He was born on September 1, 1950 in Kerala, India. In 1971, he obta...

Total Pageviews