Detecting Code Errors Create a program in C++ which checks for 1 bit errors in an error detection system which uses a single parity bit (the single parity bit checks the parity of all bits in each...

1 answer below »
Detecting Code Errors
Create a program in C++ which checks for 1 bit errors in an error detection system which uses a single parity bit (the single parity bit checks the parity of all bits in each code). Each code is 8 bits (7 bits for data and one for parity). The code distance is 2. You program should check for even parity (parity bit is 1 for even parity). Your program should allow the user to input a single unsinged decimal value up to 255, and then output whether there is a 1 bit error or not.
Cache Simulation
Create a program in C++ which simulates a direct cache. The memory array that contains the data to be cached is byte addressable and can contain 256 single byte entries or lines. The cache has only 8 entries or lines. The Data field in each line of the cache is 8 bits. Since the data stored in each line of the cache is only 8 bits, there is no need for a line field. Only a tag field is needed which is log2(256) = 8 bits.
The memory array can be filled with any values of your choice. The program should work by taking user input of a memory address (index). This input represents the memory data that should be cached. Your program will check the cache to see if the item is already cached. If it is not, your program should count a cache miss, and then replace the item currently in the cache with the data from the inputted address. Allow the user to input addresses (in a loop), until they so choose to end the program. The program should output the number of cache misses upon ending.
Answered 1 days AfterMay 05, 2021

Solution

Pulkit Aggarwal answered on May 06 2021
24 Votes

83083_operating/.vscode/settings.json
{
"files.associations": {
"iostream": "cpp"
}
}
83083_operating/chapter-9-12-labs-1-4-3-bel44mri.docx
Detecting Code...

Submit New Assignment

Copy and Paste Your Assignment Here