Skip to content

Instantly share code, notes, and snippets.

@woodbridge
Created February 1, 2015 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woodbridge/68af109cbb1694f06440 to your computer and use it in GitHub Desktop.
Save woodbridge/68af109cbb1694f06440 to your computer and use it in GitHub Desktop.
~/Dropbox/Columbia/classes/freshman/spring/ap/lab1/part2 (master★) > make clean
rm -f *.o a.out core main convert
~/Dropbox/Columbia/classes/freshman/spring/ap/lab1/part2 (master★) > ls -la
total 16
drwxr-xr-x@ 4 justin staff 136 Feb 1 12:55 .
drwxr-xr-x@ 16 justin staff 544 Feb 1 12:49 ..
-rw-r--r--@ 1 justin staff 957 Feb 1 12:55 Makefile
-rw-r--r--@ 1 justin staff 530 Feb 1 12:40 main.c
~/Dropbox/Columbia/classes/freshman/spring/ap/lab1/part2 (master★) > make
gcc -g -Wall -c -o main.o main.c
gcc -o convert main.o
~/Dropbox/Columbia/classes/freshman/spring/ap/lab1/part2 (master★) > ls -la
total 48
drwxr-xr-x@ 6 justin staff 204 Feb 1 12:55 .
drwxr-xr-x@ 16 justin staff 544 Feb 1 12:49 ..
-rw-r--r--@ 1 justin staff 957 Feb 1 12:55 Makefile
-rwxr-xr-x@ 1 justin staff 8792 Feb 1 12:55 convert
-rw-r--r--@ 1 justin staff 530 Feb 1 12:40 main.c
-rw-r--r--@ 1 justin staff 3320 Feb 1 12:55 main.o
~/Dropbox/Columbia/classes/freshman/spring/ap/lab1/part2 (master★) > echo "-1" | ./convert
signed dec: -1
unsigned dec: 4294967295
hex: ffffffff
binary: 1111 1111 1111 1111 1111 1111 1111 1111
~/Dropbox/Columbia/classes/freshman/spring/ap/lab1/part2 (master★) >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment