Question: A binary bar code scan is a bit pattern that contains only 1s and 0s. Write a program that finds the edges of light and

 A binary bar code scan is a bit pattern that contains

A binary bar code scan is a bit pattern that contains only 1s and 0s. Write a program that finds the edges of light and dark regions. Process an input bit pattern in the following manner: Assign a 1 to the output bit pattern whenever two consecutive bits (one bit and it's previous bit) are different Assign a 0 to the output bit pattern whenever two consecutive bit (One bit and it's previous bit) are the same Assign 0 to the first output bit since there is no previous bit for the bit For example, input and output bit pattern of the program that detects the edges might look like the following: Input: 00101101 Output: 00111011 Name your program barcode. Assume the input contains exactly 8 bits. As part of the solution, write and call the function edge() contain the length of the input and output arrays with the same size, the input array a1, and output array a2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!