Florida Southern Seal
CSC 4640: Programming Languages
(Spring 2025)

Syllabus

LMS

Teachers


Assignments

Assignments
Other Pages

Project 10:
Parallel XOR


Assigned: Mon Apr 07 2025
Due: 11:59:00 PM on Wed Apr 16 2025
Team Size: 1 or 2
Language: Go
Out of: 100 points


In this project, you will write functions to calculate XOR of booleans. In the final part, you will write a function that uses multiple threads!

Part 0, 10 points:

Write a function, Xor that takes two boolean (bool) parameters and returns the XOR of them.

Part 1, 30 points:

Write a function, XorList that takes an array of boolean values and returns the XOR of all elements. (The XOR of more than two booleans works the same way as addition and multiplication: just keep XORing!)

Part 2, 30 points:

Write a function, XorListBounds([]bool, int, int) that returns the XOR of all elements in the array between the first and second integer parameters (inclusive on both ends).

Part 3, 30 points:

Write a function, ParallelXorList([]bool, int) that takes an array of booleans and the number of threads to use and returns the XOR of all elements in the array. It should use the requested number of (software) threads.

Submitting your Project: Put all your code in one file named project10.go in a folder named <TeamName>Project10, where <TeamName> has all team members' (last) names separated by 'And' in PascalCase. For example, if I had worked with Eve Stock, my folder name would be BurkeAndStockProject10. The code file should be located directly in that folder. Since Go is a compiled language, if you want me to grade it before you're done, add stub functions for all the unfinished parts so it can compile with my testing code. Make sure your file does not have a main function! Zip the folder up (don't change the name of the zipped file) and upload the zip file to the assignment in Canvas.