作者zptdaniel ()
看板TransCSI
標題Re: [問題] 計算機概相一些觀念釐清
時間Tue Jul 7 18:41:27 2009
※ 引述《larryfeng (ㄚ峰)》之銘言:
: 1. Which of the following is not a graphic device?
: (a) Card reader
: (b) Trackball
: (c) Joystick
: (d) Digitizer table (這種題目是背誦題嗎?)
: ans: (a) (如果沒有背過的話,可以做判斷嗎?)
這種題目算是考...你看的東西多不多而已
不過graphic device 是繪圖裝置 所以Card reader應該就很明顯了
: 2. Which of the following is not an interrupt?
: (a) Power on
: (b) Reset
: (c) Overflow
: (d) OS trap (答案我曉得,只是想請問 OS trap 是什麼意思?)
微軟的經典對話框 什麼程式即將關閉blah blah blah...
應該算是OS trap?
: 3. For the following items, which one is unnecessary when designing a number
: format?
: (a) CPU types
: (b) Data types
: (c) Number of registers
: (d) Addressing modes (不懂題目真的的意思 無法作答@@)
: ANS:(C)
何者不是設計number format的必要條件
: 4. If the macro
: #define RECTANGLE_AREA ( x,y )( (x) * (y) )
: has been defined. Then the line
: rectArea = RECTANGLE_AREA (a+4,b+7); will be expanded to
: (1) rectArea = 11;
: (2) rectArea = (a+4*b+7);
: (3) rectArea = ( (a+4)*(b+7) );
: (4) RECTANGLE_AREA ( a+4, b+7 );
: ANS:(2) (可是我怎麼覺得是 3 ?)
(3)吧 因為題目是給(x) * (y) 不是 x*y
: 5. Which date structure is most suitable for implementing Priority Queue?
: (a) queue
: (b) stack
: (c) linked list
: (d) heap
: ans:(d) (請問一下答案為D的理由是?)
priority queue 是從當中取出priority最高的資料
所以用heap.heap 未指明就是說max heap,
每次均可由heap得到priority最高的一筆資料.
: 6. Consider an 8-bit binary number with the following bit pattern:
: 10101110
: (a)What is the decimal number if the bit pattern represents a floating number of
: the following formal :SEEEMMMM ( S:sing E:exponent M:mantissa ).
"The sign is 0 for 6."
^^^^^^^^^^^^^^^^^^^^^^ ??? 你題目可能打太長了,我猜有內容被截掉.
: (b)What are the maximal and the minimal positive numbers that can be
: represented by this format?
: (理念沒有學過,不知道該如何下手?)
: (如同上次的 IEEE754 一樣,希望可以教教我)
(a)
1 010 1110 = (-1)^1 * 2^(-2) * 0.1110 = -0.00111(2)
S EEE MMMM S E M ^代表二進位
請自行轉成十進位
(b)
maximal positive numbers = 2^3*0.1111 = 111.1 = 7.5
minimal ....=2^(-4)*0.1111 = 0.00001111 =(請自行轉換)
有錯請指教~感恩!
--
這流浪的人,努力讓夢成真。
That's the way I live, that's the way I did.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.194.100.216