
Please use C++
In this lab, you need to write a program which, given a seven digit binary input given below, it will check to see if there is a single bit error using the Hamming Code method discussed in lab. For a sample of Hamming Code, the input: 1110101 will reveal that ‘110’ is the location of the error (meaning the sixth slot in the input), so the corrected number would be 1010101, and the actual message transmitted, would be 1011, which is 11 in decimal. You can use this example to test your program to ensure it’s working correctly.
Create a program which can, given a 7-bit long input, written in Hamming Code style, do the three following tasks, displaying the results as output.
(1) Determine if there’s an incorrect bit, and if so, where it is.
(2) Display what the CORRECT code should look like (if it needs to be corrected.)
(3) Display the decimal form of the message that was sent, after any needed correction.
Remember, when using Hamming code, only the 7, 6, 5 and 3 slots comprise the actual message!
For your input, use the following five inputs, and show the results of each:
1101010
1010101 (there should be no error)
0010111
0110011 (there should be no error)

Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 6 images

- Write a program in C++ to read input an integer n and print a square pattern with n number of rows using *' character. Sample Output: Input the number of characters for a side: 4 **** **** **** ****arrow_forwardWrite a C++ program that asks the user to enter a positive integer n and then that reads n user input integers and finally prints the message The numbers you entered are in increasing order if they are in increasing order or the message The numbers you entered are NOT in increasing order if they are not. See the remark below. Remark:- Remember given the numbers a1, az, as, ..., an; we say they are in increasing order if ay 5 a, 5 a,≤ .... ≤ an. Moreover remember that if you have only one number from the user input then the number automatically is in increasing order.(CAN ONLY USE WHILE LOOPS)arrow_forwardWhat is the code in C++arrow_forward
- Draw out a TM (computable function) that does the following: - Input: Two binary string of equal length separated by # (example: 0110#1010) - Output: The result from performing logical AND on the two binary strings (0010). You may write the output on Tape 2.arrow_forwardWrite a c++ program that prompts the user to input a value for n. Based on the value of n, your program should display the following pattern: For n = 1, +- For n = 2, +-+- +- For n = 3, +-+-+- +-+- +- and so on. Hint: first try to identify the pattern by examining how n relates to the displayed pattern.arrow_forwardCan yo do this in C++, here are the input : 41360114 48648110 11036224 83620684 11806064 22036266 66830416 44168838 41664810 36310244 83033068 03631826 46112613 06831181 12200621 03846661 11141362 04624101 82340210 30634203 38034162 68036462 02614316 08800136 83688326 40602830 63321231 81044114 20012082 21014838 21081200 36068048 64120020 32311142 42400042 86322306 68108012 20380100 43116446 13323000 44080311 16411816 32020468 42838624 88826006 28360306 30822218 13683682 04801288 10428026 23386111 33113860 02288384arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





