logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(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

(5/5)
Attachments:

Related Questions

. Introgramming & 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 ma

. 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 Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

583 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

716 Answers

Hire Me
expert
Husnain SaeedComputer science

598 Answers

Hire Me
expert
Atharva PatilComputer science

785 Answers

Hire Me

Get Free Quote!

348 Experts Online