Earn Higher Grades With Instant Assignment Help.Ask Question!

C++ Programming
(5/5)

DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

DNA String compression example

 

Definition:

A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.

Assume the following binary encoding: A = 00, T= 01, C = 10, G = 11

 

We can fit 4 characters from a DNA string into an unsigned char.If (|d| % 4 != 0), then pad with trailing zeros.  Suppose d is ATTCGG.

Compress ATTCGG using bitwise operators in C++. First print |d|.

DNA String compression example

 

Definition:    

A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0.   |d| is the length of d.

Assume the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

Initialize an 8-bit unsigned char to store compressed bits.

DNA String compression example

 

Definition: 

 A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0.  |d| is the length of d.

Assume the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

Read the first character of d and use bitwise operators to place its binary encoding in the proper location.

DNA String compression example

 

Definition: A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0.  |d| is the length of d.

Assume the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

Read the next character of d and use bitwise operators to place its binary encoding in the proper location.

DNA String compression example

 

Definition:  

  A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0 |d| is the length of d.

Assume the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

Read the next character of d and use bitwise operators to place its binary encoding in the proper location.

DNA String compression example

 

Definition: 

A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.

Assme the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

Read the next character of d and use bitwise operators to place its binary encoding in the proper location.

 

DNA String compression example

Definition: A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0.

  |d| is the length of d.

Assume the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

Print the base-10 integer value of the 8-bit unsigned char.

 

DNA String compression example

 

Definition:  A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.

Assume the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

Reinitialize the 8-bit unsigned char.

DNA String compression example

 

Definition:         

A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0 |d| is the length of d.

 

Assume the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

 

Read the next character of d and use bitwise operators to place its binary encoding in the proper location.

DNA String compression example

 

Definition:         

A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0.   |d| is the length of d.

 

Assume the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

 Read the next character of d and use bitwise operators to place its binary encoding in the proper location.

 

DNA String compression example

 

Definition:  A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0.     |d| is the length of d.

Assume the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

Once we reach the end of d, add trailing zeros to fill the 8-bit

unsigned char.

DNA String compression example

 

Definition:A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0.    |d| is the length of d.

 

Assume the following binary encoding:

A = 00, T= 01, C = 10, G = 11

d = ATTCGG

Print the base-10 integer value of the 8-bit unsigned char

Attachments:
(5/5)

Related Questions

CSI 1420 Introduction to C Programming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu

The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Assignment To Be Done By Our ExpertsGet A+ Grade Solution Guaranteed

expert
joyComputer science
(4/5)
12 Answers Hire Me
expert
Robert DLaw
(4.8/5)
887 Answers Hire Me
expert
Dr Samuel BarberaStatistics
(5/5)
773 Answers Hire Me
expert
Tutor For YouEconomics
(5/5)
923 Answers Hire Me