Office Lens 20170830-234725.pdf

Office Lens 20170830-234725.pdf - Example#4 NumberSystems...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Example #4 -- Number Systems for Computing <1 north: —/Examples >cat example04 . C Example #4 -- Display values in base 10, base 8, base 16 and base 2 #include <stdio.h> #include "/user/cse320/Iib/bit1ib.h" int main ( ) int 7 for (1=07 1<32; 1++) printf ( " 2d 2* 20 32s\n" , 1, 1, bit32 ( return 0 ,• <2 north:—/Examples >gcc -Wall example04.c /user/cse320/1ib/bit1ib.0 <3 north : N/Examples >a . out 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 a 11 b 12 c 13 d 14 15 f 16 10 17 11 18 12 19 13 20 14 21 15 22 16 23 17 24 18 25 19 26 la 27 1b 28 Ic 29 Id 30 le 31 If 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 00000000000000000000000000000000 000000000000000000000000000000 00000000000000000000000000000010 00000000000000000000000000000011 00000000000000000000000000000100 0000000000000000000000000000 01 00000000000000000000000000000110 00000000000000000000000000000111 00000000000000000000000000001000 000000000000000000000000000010 00000000000000000000000000001010
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern