[理工] 101清大計系

作者: waynetooni (wegogo)   2019-02-03 18:50:59
https://imgur.com/k6tnnGe
https://imgur.com/wtSv3vP
第一題的b小題
code註解有說execlp()會destroying the memory image of the program containing the execlp() system
那這樣在算有幾個process被創造時,要把被毀掉的process算進去嗎?
https://imgur.com/rXxbTq4
https://imgur.com/xpy92a8
第8題c小題要求有號數x-y
我的作法是把y先換成2進位,再取y的2捕數,變成-y
然後算x+(-y),再轉回Hex,得到的答案跟b小題一樣 0x85B3
這樣算有錯嗎?
我之前有看到有人寫x-y = -0xBA09-0x3456 = -(0xBA09+0x3456)=-0xEE5F
感覺有點奇怪...
先感謝各位高手了~~

Links booklink

Contact Us: admin [ a t ] ucptt.com