{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw3problem5 - FHe Edt Seamh Wew Took OpHons Language...

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

View Full Document Right Arrow Icon
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: FHe Edt Seamh Wew Took OpHons Language Bufiers Heb muse ulsl a: mama was m—i Pmblem?hw3-E I*Homework 3 Prohlem.5*f I*James Haile SID: 991826199*I #inelude <stdio.h> —int main {1 { int R, value; printf{"Enter value for x: kn"); scanf{"%i", Ex}; printf{"Enter subtracted value: 1n"); scanf{"%i", Evalue}; printf{"Value for x is: %[32]b kn", x}; printf{"Suhtraeted value is: %[32]h kn", value}; printf{"Bitwise one's oumplement of subtracted value: %[32]h fin”, ~value}; printf{"Bitwise one's oumplement of subtracted value plus one: %[32]h kn", ~value+1}; printf{"Value of y if y = x — value: %[32]h kn", x+~value+1}; return fl; } E >ch —u problem?hu3.c Enter value for x: 28 Enter subtracted value: 15 value for x is: DDDDDDDDDDDDDDDDDDDDDDDDUDDlllDD Subtracted value is: DDDDDDDDDDDDDDDDDDDDDDDDDDDD1111 Bituise one's complement of subtracted value: 11111111111lllllllllllllllllflDDD BitI-IiSE one's complement of subtracted value plus one: 1111111111111111lllllllllllllillillill value of v if v = x — value: DDDDDDDDDDDDDDDDDDDDDDDDDDDDllDl >Exit code: D [1 5—111— El |i=16 to=13 INS (CR+LF:I ...
View Full Document

{[ snackBarMessage ]}