40. Checksum Validation

Discussions1
Log in to post comments and replies.
You
Loading editor...
rohanclevduct
rohanclevduct
May 30 2026

1st example "10^20^30^40=60" is incorrect.

// 10: 001010

// 20: 010100

// 30: 011110

// 40: 101000

//xor: 101010

// 60: 111100

NOTE: 60 != xor operation. Output should be 0
 

// 5: 0101

// 9: 1001

// 1: 0001

//xor:1101

// 3: 0011

(Output: 0) Correct
 

// 7: 111

// 3: 011

//xor:100

// 4: 100

(Output: 1) Correct
 

+8