as title.....
題目是補充資料p.26,27的
1-1,1-5,1-10,1-16,1-30
共五題
記得交作業喔!:)
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: nlpc17.csie.ntu.
> -------------------------------------------------------------------------- <
作者: dinocookie (恐龍餅干) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Fri Oct 20 17:38:50 2000
※ 引述《fishC (一個人無憂無慮)》之銘言:
: as title.....
: 題目是補充資料p.26,27的
: 1-1,1-5,1-10,1-16,1-30
: 共五題
: 記得交作業喔!:)
不會吧! 有作業喔!
誰要貼一下題目... 我可以馬上寫一寫答案
--
嘴巴不是用來說話 嘴巴不是用來親親 嘴巴之所以被稱作嘴巴
是因為嘴巴是用來吃東西的 屁是從Anus出來的 話是由嘴裡講出來的
當您說這些都是屁話時... 請善待您性感的雙唇 它們是用來吃東西的
不是拉屎用的 除非您總是把臉埋在馬桶裡 我不忍也不予置評 大便臉(哈哈...屎面)
否則請牢記: 屎面, 請尊重別人 尊重自己的嘴 讓您的Anus保有放屁的尊嚴
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: ntucsx.csie.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: aecho (星空下的呢喃) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Fri Oct 20 18:04:56 2000
※ 引述《dinocookie (恐龍餅干)》之銘言:
: ※ 引述《fishC (一個人無憂無慮)》之銘言:
: : as title.....
: : 題目是補充資料p.26,27的
: : 1-1,1-5,1-10,1-16,1-30
: : 共五題
: : 記得交作業喔!:)
: 不會吧! 有作業喔!
: 誰要貼一下題目... 我可以馬上寫一寫答案
順便貼答案^^
--
有多少笑語 就有多少哭泣
幸福的背後 總是隱藏著悲劇
-----摘自 趙寧 --找一個字代替--
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: wolf.m7.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: dinocookie (恐龍餅干) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Fri Oct 20 18:07:59 2000
※ 引述《aecho (星空下的呢喃)》之銘言:
: ※ 引述《dinocookie (恐龍餅干)》之銘言:
: : 不會吧! 有作業喔!
: : 誰要貼一下題目... 我可以馬上寫一寫答案
: 順便貼答案^^
不反對... 可是沒題目啊
--
嘴巴不是用來說話 嘴巴不是用來親親 嘴巴之所以被稱作嘴巴
是因為嘴巴是用來吃東西的 屁是從Anus出來的 話是由嘴裡講出來的
當您說這些都是屁話時... 請善待您性感的雙唇 它們是用來吃東西的
不是拉屎用的 除非您總是把臉埋在馬桶裡 我不忍也不予置評 大便臉(哈哈...屎面)
否則請牢記: 屎面, 請尊重別人 尊重自己的嘴 讓您的Anus保有放屁的尊嚴
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: ntucsx.csie.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: garrys (北鼻) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Fri Oct 20 18:18:48 2000
※ 引述《dinocookie (恐龍餅干)》之銘言:
: ※ 引述《fishC (一個人無憂無慮)》之銘言:
: : as title.....
: : 題目是補充資料p.26,27的
: : 1-1,1-5,1-10,1-16,1-30
: : 共五題
: : 記得交作業喔!:)
: 不會吧! 有作業喔!
: 誰要貼一下題目... 我可以馬上寫一寫答案
1-1
List the binary, octal, & hexadecimal numbers from 16 to 31.
1-5
Convert the following binary numbers to decimal:
101110, 1110101.11 , 110110100
1-10
Convert the following decimal numbers to the indicated bases using the
method of Example 1-3 & 1-6
(a)7562.45 to octal (b)1938.257 to hexadecimal (c)175.175 to binary
1-16
Perform the subtraction with the following unsigned binary numbers by
taking the 2's complement of the subtrahend
(a)11010-10000 (b)11010-1101 (c)100-110000 (d)1010100-1010100
1-30
What bit must be complemented to change an ASCII letter from capital to
lowercase, and vice versa?
--
常躲在被窩裡偷偷哭泣,
不為什麼..只因為,我想你...
常常悶悶不樂,
不為什麼..只因為,你不懂我的心...
愛一個人..真的好難好難..
我始終搞不清自己應該扮演的角色...
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: Garry.m1.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: ahhsin (我就是這種人) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Sat Oct 21 02:52:24 2000
※ 引述《garrys (北鼻)》之銘言:
: ※ 引述《dinocookie (恐龍餅干)》之銘言:
: : 不會吧! 有作業喔!
: : 誰要貼一下題目... 我可以馬上寫一寫答案
: 1-1
: List the binary, octal, & hexadecimal numbers from 16 to 31.
: 1-5
: Convert the following binary numbers to decimal:
: 101110, 1110101.11 , 110110100
: 1-10
: Convert the following decimal numbers to the indicated bases using the
: method of Example 1-3 & 1-6
: (a)7562.45 to octal (b)1938.257 to hexadecimal (c)175.175 to binary
: 1-16
: Perform the subtraction with the following unsigned binary numbers by
: taking the 2's complement of the subtrahend
: (a)11010-10000 (b)11010-1101 (c)100-110000 (d)1010100-1010100
: 1-30
: What bit must be complemented to change an ASCII letter from capital to
: lowercase, and vice versa?
恩...最後一題題目看不懂耶....幫忙解釋一下...順便也把解答貼上去吧!
呵呵...感謝你們...
--
最重要的一點就是感覺....
The important point is feeling.
你說對不對?
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: 139.175.219.9
> -------------------------------------------------------------------------- <
作者: garrys (北鼻) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Sat Oct 21 12:05:27 2000
※ 引述《ahhsin (我就是這種人)》之銘言:
: ※ 引述《garrys (北鼻)》之銘言:
: : 1-1
: : List the binary, octal, & hexadecimal numbers from 16 to 31.
: : 1-5
: : Convert the following binary numbers to decimal:
: : 101110, 1110101.11 , 110110100
: : 1-10
: : Convert the following decimal numbers to the indicated bases using the
: : method of Example 1-3 & 1-6
: : (a)7562.45 to octal (b)1938.257 to hexadecimal (c)175.175 to binary
: : 1-16
: : Perform the subtraction with the following unsigned binary numbers by
: : taking the 2's complement of the subtrahend
: : (a)11010-10000 (b)11010-1101 (c)100-110000 (d)1010100-1010100
: : 1-30
: : What bit must be complemented to change an ASCII letter from capital to
: : lowercase, and vice versa?
: 恩...最後一題題目看不懂耶....幫忙解釋一下...順便也把解答貼上去吧!
: ^^^^^^^^^^^^^^^^^^^查查ASCII表,再多看幾次題目就可以看懂了...
呵呵...感謝你們...
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: ntucsb.csie.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: dinocookie (恐龍餅干) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Sat Oct 21 12:40:24 2000
※ 引述《garrys (北鼻)》之銘言:
: ※ 引述《dinocookie (恐龍餅干)》之銘言:
: : 不會吧! 有作業喔!
: : 誰要貼一下題目... 我可以馬上寫一寫答案
: 1-1
: List the binary, octal, & hexadecimal numbers from 16 to 31.
decimal/binary/octal/hexadecimal
16/0001000/0020/0010
17/0001001/0021/0011
18/0001010/0022/0012
... 嘔! 現在我才看到...限於時間... 等一下要去系館...先貼一點點
: 1-5
: Convert the following binary numbers to decimal:
: 101110, 1110101.11 , 110110100
101110 通常我是由右而左四個一組...先轉成hex再轉回dec
10,1110 -> 2E -> 46
沒時間了... 我要出發了... (待續)
: 1-10
: Convert the following decimal numbers to the indicated bases using the
: method of Example 1-3 & 1-6
: (a)7562.45 to octal (b)1938.257 to hexadecimal (c)175.175 to binary
: 1-16
: Perform the subtraction with the following unsigned binary numbers by
: taking the 2's complement of the subtrahend
: (a)11010-10000 (b)11010-1101 (c)100-110000 (d)1010100-1010100
: 1-30
: What bit must be complemented to change an ASCII letter from capital to
: lowercase, and vice versa?
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: ntucsx.csie.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: kentman ( ) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Sat Oct 21 16:16:58 2000
※ 引述《dinocookie (恐龍餅干)》之銘言:
: ※ 引述《garrys (北鼻)》之銘言:
: : 1-1
: : List the binary, octal, & hexadecimal numbers from 16 to 31.
: decimal/binary/octal/hexadecimal
: 16/0001000/0020/0010
^^^^^^^
有沒有少一個0啊??
: 17/0001001/0021/0011
: 18/0001010/0022/0012
: ... 嘔! 現在我才看到...限於時間... 等一下要去系館...先貼一點點
--
● ██ ██
∥████████
∥████████
∥████████
∥████████
∥ ██ ██
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: dup2.NTOU.edu.tw
> -------------------------------------------------------------------------- <
作者: dinocookie (恐龍餅干) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Sat Oct 21 16:30:42 2000
※ 引述《dinocookie (恐龍餅干)》之銘言:
※ 引述《garrys (北鼻)》之銘言:
: ※ 引述《dinocookie (恐龍餅干)》之銘言:
: : 不會吧! 有作業喔!
: : 誰要貼一下題目... 我可以馬上寫一寫答案
: 1-1
: List the binary, octal, & hexadecimal numbers from 16 to 31.
decimal/binary/octal/hexadecimal
16/00010000/0020/0010
17/00010001/0021/0011
18/00010010/0022/0012
19/00010011/0023/0013
...
31/00011111/0037/001F
32/00100000/0040/0020
先前貼的漏一個零...
我的習慣是 dec <-> hex <-> bin <-> oct 這樣的轉換
: 1-5
: Convert the following binary numbers to decimal:
: 101110, 1110101.11 , 110110100
101110 通常我是由右而左四個一組...先轉成hex再轉回dec
10,1110 -> 2E -> 46
1110101.11 = ... = 117.75
110110100 -> 1, 1011, 0100 -> 1B4 -> 436
: 1-10
: Convert the following decimal numbers to the indicated bases using the
: method of Example 1-3 & 1-6
: (a)7562.45 to octal (b)1938.257 to hexadecimal (c)175.175 to binary
我沒有講義...
講義怎麼算不知道...
不過這真的很討厭...
(a) 應該是 7562 -> 16612
.45 -> .34631....
其它就自己試試吧
要注意的就是小數以下的處理
: 1-16
: Perform the subtraction with the following unsigned binary numbers by
: taking the 2's complement of the subtrahend
: (a)11010-10000 (b)11010-1101 (c)100-110000 (d)1010100-1010100
subtrahend?
11010 - 10000 = 11010 + (01111 + 1) = 11010 + (10000) = (1)01010
11010 - 1101 = 11010 + (0010 + 1) = 11010 + (0011) = 11101
應該是這樣吧... 反正我沒講義
: 1-30
: What bit must be complemented to change an ASCII letter from capital to
: lowercase, and vice versa?
這... 我忘了
#include <stdlib.h>
int main(void)
{
printf(" The answer should be %d .\n",'A' - 'a');
return 0;
}
.... -32 ... 原來如此... :)
--
今天的 HiNet 有問題 好慢
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: ntucsx.csie.ntu.edu.tw
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: h152.s20.ts30.hinet.net
> -------------------------------------------------------------------------- <
作者: dinocookie (恐龍餅干) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Sat Oct 21 16:31:28 2000
※ 引述《kentman ( )》之銘言:
: ※ 引述《dinocookie (恐龍餅干)》之銘言:
: : decimal/binary/octal/hexadecimal
: : 16/0001000/0020/0010
: ^^^^^^^
: 有沒有少一個0啊??
是少了一個沒錯...
: : 17/0001001/0021/0011
: : 18/0001010/0022/0012
: : ... 嘔! 現在我才看到...限於時間... 等一下要去系館...先貼一點點
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: h152.s20.ts30.hinet.net
> -------------------------------------------------------------------------- <
作者: dinocookie (恐龍餅干) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Mon Oct 23 01:50:06 2000
※ 引述《dinocookie (恐龍餅干)》之銘言:
: ※ 引述《dinocookie (恐龍餅干)》之銘言:
: ※ 引述《garrys (北鼻)》之銘言:
: : 1-1
: : List the binary, octal, & hexadecimal numbers from 16 to 31.
: decimal/binary/octal/hexadecimal
: 16/00010000/0020/0010
: 17/00010001/0021/0011
: 18/00010010/0022/0012
: 19/00010011/0023/0013
: ...
: 31/00011111/0037/001F
: 32/00100000/0040/0020
: 先前貼的漏一個零...
: 我的習慣是 dec <-> hex <-> bin <-> oct 這樣的轉換
: : 1-5
: : Convert the following binary numbers to decimal:
: : 101110, 1110101.11 , 110110100
: 101110 通常我是由右而左四個一組...先轉成hex再轉回dec
: 10,1110 -> 2E -> 46
: 1110101.11 = ... = 117.75
: 110110100 -> 1, 1011, 0100 -> 1B4 -> 436
: : 1-10
: : Convert the following decimal numbers to the indicated bases using the
: : method of Example 1-3 & 1-6
: : (a)7562.45 to octal (b)1938.257 to hexadecimal (c)175.175 to binary
: 我沒有講義...
: 講義怎麼算不知道...
: 不過這真的很討厭...
: (a) 應該是 7562 -> 16612
: .45 -> .34631....
: 其它就自己試試吧
: 要注意的就是小數以下的處理
: : 1-16
: : Perform the subtraction with the following unsigned binary numbers by
^^^^^^^^
啊! 要不是cutevapor問我 我還不知道自己又看錯了...
unsigned 先轉成 signed ... 再開始玩才對
至於要用幾個 bit ... 轉成 signed 後兩個數字中最長的為準
11010 - 10000 = 11010 - (010000) = 011010 + (110000) = ...
11010 - 1101 = 11010 - (01101) = 11010 + (10011) = ...
進位進到 sign bit 時
如果還有進位 捨掉不管... 數字有效的最高只到 sign bit
照抄的會很慘喔
--
嘴巴不是用來說話 嘴巴不是用來親親 嘴巴之所以被稱作嘴巴
是因為嘴巴是用來吃東西的 屁是從Anus出來的 話是由嘴裡講出來的
當您說這些都是屁話時... 請善待您性感的雙唇 它們是用來吃東西的
不是拉屎用的 除非您總是把臉埋在馬桶裡 我不忍也不予置評 大便臉(哈哈...屎面)
否則請牢記: 屎面, 請尊重別人 尊重自己的嘴 讓您的Anus保有放屁的尊嚴
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: ntucsx.csie.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: aecho (星空下的呢喃) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Mon Oct 23 02:01:36 2000
※ 引述《dinocookie (恐龍餅干)》之銘言:
: ※ 引述《dinocookie (恐龍餅干)》之銘言:
: ※ 引述《garrys (北鼻)》之銘言:
: : 1-30
: : What bit must be complemented to change an ASCII letter from capital to
: : lowercase, and vice versa?
: 這... 我忘了
: #include <stdlib.h>
: int main(void)
: {
: printf(" The answer should be %d .\n",'A' - 'a');
: return 0;
: }
: .... -32 ... 原來如此... :)
剛剛查表是用2進位的
大小寫之間差10 0000
--
有多少笑語 就有多少哭泣
幸福的背後 總是隱藏著悲劇
-----摘自 趙寧 --找一個字代替--
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: ntucst.csie.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: cutevapor (少男情懷總是屎) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Mon Oct 23 02:18:49 2000
※ 引述《dinocookie (恐龍餅干)》之銘言:
: 啊! 要不是cutevapor問我 我還不知道自己又看錯了...
: unsigned 先轉成 signed ... 再開始玩才對
: 至於要用幾個 bit ... 轉成 signed 後兩個數字中最長的為準
: 11010 - 10000 = 11010 - (010000) = 011010 + (110000) = ...
: 11010 - 1101 = 11010 - (01101) = 11010 + (10011) = ...
: 進位進到 sign bit 時
: 如果還有進位 捨掉不管... 數字有效的最高只到 sign bit
: 照抄的會很慘喔
這樣子算不算造福各位???
呵呵...也許只有我會覺得奇怪...
誰叫我第一次接觸二進位的運算
覺得很恐怖
所以到版上來尋求幫助...
才會發現的...
--
人往往不懂珍惜手邊的幸福
卻常盲目追求不可能實現的夢想
一旦幸福遠去才悔不當初
別忘了曾經真正關心過你的人
也許你這一生就只有他會真正的用心在你身上
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: h211.s30.ts30.hinet.net
> -------------------------------------------------------------------------- <
作者: dinocookie (恐龍餅干) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Mon Oct 23 02:30:20 2000
※ 引述《cutevapor (少男情懷總是屎)》之銘言:
: ※ 引述《dinocookie (恐龍餅干)》之銘言:
: : 啊! 要不是cutevapor問我 我還不知道自己又看錯了...
: : unsigned 先轉成 signed ... 再開始玩才對
: : 至於要用幾個 bit ... 轉成 signed 後兩個數字中最長的為準
: : 11010 - 10000 = 11010 - (010000) = 011010 + (110000) = ...
: : 11010 - 1101 = 11010 - (01101) = 11010 + (10011) = ...
: : 進位進到 sign bit 時
: : 如果還有進位 捨掉不管... 數字有效的最高只到 sign bit
: : 照抄的會很慘喔
: 這樣子算不算造福各位???
: 呵呵...也許只有我會覺得奇怪...
: 誰叫我第一次接觸二進位的運算
: 覺得很恐怖
: 所以到版上來尋求幫助...
: 才會發現的...
如果是有號數要延伸bit數
ex: 原來有效是 4 bits 要轉成 8 bits
4(d) = 0100(b) and -4(d) = 1100(b)
請將 sign bit 延伸... 4 -> 00000100(b)
-4 -> 11111100(b)
基本上... 我是很懶的人...
除非是最後一步... 寫到作業紙上的時候 才會很仔細的看題目...
--
嘴巴不是用來說話 嘴巴不是用來親親 嘴巴之所以被稱作嘴巴
是因為嘴巴是用來吃東西的 屁是從Anus出來的 話是由嘴裡講出來的
當您說這些都是屁話時... 請善待您性感的雙唇 它們是用來吃東西的
不是拉屎用的 除非您總是把臉埋在馬桶裡 我不忍也不予置評 大便臉(哈哈...屎面)
否則請牢記: 屎面, 請尊重別人 尊重自己的嘴 讓您的Anus保有放屁的尊嚴
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: ntucsx.csie.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: Pavement (皮膚悶啦~~~@_@) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Mon Oct 23 02:40:23 2000
※ 引述《dinocookie (恐龍餅干)》之銘言:
: ※ 引述《cutevapor (少男情懷總是屎)》之銘言:
: : 這樣子算不算造福各位???
: : 呵呵...也許只有我會覺得奇怪...
: : 誰叫我第一次接觸二進位的運算
: : 覺得很恐怖
: : 所以到版上來尋求幫助...
: : 才會發現的...
: 如果是有號數要延伸bit數
: ex: 原來有效是 4 bits 要轉成 8 bits
: 4(d) = 0100(b) and -4(d) = 1100(b)
: 請將 sign bit 延伸... 4 -> 00000100(b)
: -4 -> 11111100(b)
: 基本上... 我是很懶的人...
: 除非是最後一步... 寫到作業紙上的時候 才會很仔細的看題目...
真是幫了我大忙
看來大家都是半夜才開始寫作業....
--
注意到了嗎?
所謂的懶趴熊其實是一隻豬,
牠只是把鼻子靠近你罷了.괊
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: Hamlet.m1.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: ID5 (望??妄??忘??) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Mon Oct 23 03:36:43 2000
※ 引述《dinocookie (恐龍餅干)》之銘言:
: 如果是有號數要延伸bit數
: ex: 原來有效是 4 bits 要轉成 8 bits
: 4(d) = 0100(b) and -4(d) = 1100(b)
: 請將 sign bit 延伸... 4 -> 00000100(b)
: -4 -> 11111100(b)
: 基本上... 我是很懶的人...
: 除非是最後一步... 寫到作業紙上的時候 才會很仔細的看題目...
看不懂ㄋㄟ~~~
不是只要把兩個數補成一樣多位數就可以做了嗎??
我是這樣~~~
(b)11010 - 1101 = 11010 - 01101 = 11010 + ( 10010 + 1 )
^補一個0
= 11010 + 10011 = 101101 = 1101
^多一位為正
(c)100 - 110000 = 000100 - 110000 = 000100 + ( 001111 + 1 )
^^^補三個0
= 000100 + 010000 = 010100 = - ( 101011 + 1 ) = - 101100
沒有多一位是負的~~再用補數換回來~~~
這樣可以吧??
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: ntucsa.csie.ntu.edu.tw
> -------------------------------------------------------------------------- <
作者: ID5 (望??妄??忘??) 看板: b89902xxx
標題: Re: 星期一記得教計概作業喔!:)
時間: Mon Oct 23 03:44:37 2000
※ 引述《dinocookie (恐龍餅干)》之銘言:
: 啊! 要不是cutevapor問我 我還不知道自己又看錯了...
: unsigned 先轉成 signed ... 再開始玩才對
^^^^^^^^^^^^^^^^^^^^^^^要嗎??記得不是這樣ㄚ~~~~
印象中是要補成一樣多位吧~~~~
手上沒有講義~~~也不知道對不對~~~~
真糟~~~
: 至於要用幾個 bit ... 轉成 signed 後兩個數字中最長的為準
: 11010 - 10000 = 11010 - (010000) = 011010 + (110000) = ...
(a)11010 - 10000 = 11010 + ( 01111 + 1 ) = 11010 + 10000 = 101010 = 1010
^
正的話會冒出這一位~~直接捨去~
: 11010 - 1101 = 11010 - (01101) = 11010 + (10011) = ...
: 進位進到 sign bit 時
: 如果還有進位 捨掉不管... 數字有效的最高只到 sign bit
: 照抄的會很慘喔
--
※ 發信站: 批踢踢實業坊(ptt.twbbs.org)
◆ From: ntucsa.csie.ntu.edu.tw