This is the archived website of SI 486H from the Spring 2016 semester. Feel free to browse around; you may also find more recent offerings at my teaching page.

Problem 16

Demo Bull Mountain

Due: February 2
Points: 1

The RDrand instruction of Intel's Bull Mountain architecture is available on Intel Core processors generation 3 ("Ivy Bridge") or later. The CS Department lab machines have Ivy Bridge processors, so it definitely works there.

Write a short C program, along with a Makefile for how to compile it using gcc in Linux, that generates a random 32-bit int using the RDRand function, and prints it out in hexadecimal notation.

I'm intentionally not telling you exactly how to do this. It'll be a short program but you have to do some research to figure out exactly how to call the rdrand instruction from gcc. Be sure to list the references you use as comments in the program you submit.

Submit your program according to the instructions on the submit page.