Олимпиадный тренинг

Задача 28422. RAID


Задача

Темы:
When storing data, one of the main tasks of – maintaining a balance between the cost of the number of discs and the reliability of recording. One of the compromises in terms of reliability and cost of data storage is RAID-3 – a redundant array of independent disks with a dedicated disk for storing parity blocks. Our RAID-3 consists of five disks, four of which contain information, and the fifth – blocks of parity bits. When four bytes are written (one byte for each of the four disks), a parity check byte is calculated, made up of the parity bits. For each of the eight bits, the sum of the bit values ​​in these bits in all data bytes is calculated, while the value of the control bit is chosen so that the sum of the values ​​in all bits (including the control one) is even. For example, we have two main disks and the bytes 10010010 and 01110111 are written to them. Then the value of the control byte is 11100101 – in each digit the sum is even.

One of the four main drives in RAID-3 has failed. The values ​​of the bytes in the three remaining disks and the value of the byte on the control disk are known. What byte was written on the broken disk? All numbers are in decimal notation.
 
– values ​​on first three disks: 177, 177, 177, check byte: 177;
– values ​​on first three disks: 79, 79, 79, check byte: 0;
– values ​​on first three disks: 46, 56, 248, check byte: 90;
– values ​​on the first three disks: 255, 0, 150, control byte 96;
– values ​​on the first three disks: 137, 232, 23, control byte 212.

Answers should also be given in decimal notation. Share answers
space.