Question: Python Bitstring question: 1. Define and implement a function called processBitstrings(first, second) that takes two bitstrings (first and second) Assume that the bits are numbered
Python Bitstring question:
1. Define and implement a function called processBitstrings(first, second) that takes two bitstrings (first and second)
Assume that the bits are numbered from right-to-left starting from 0. So, bit i is in the i-th column from the right.
a. Define the bitsum as the sum of the i-th bits of a pair (or set) of bitstrings.
b. Define the bitsum maximum (bitsumMax) to be the highest of all the bitsums.
c. Define the bitsum minimum (bitsumMin) to be the lowest non-zero value of all the bitsums.
The function returns a bitstring as follows: the i-th digit of the return value is: 1 if the i-th bitsum is equal to the bitsum maximum or the bitsum minimum.
0 otherwise.
I really appreciate your help! thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
