Copy this code and paste in .circ file then open that .circ file in logisim
This file is intended to be loaded by Logisim (http://www.cburch.com/logisim/).