Urgent!! Need Computer genius!

2013-06-05 5:56 am
Case 1 :http://wongju13.wix.com/chan

Some cars incorporate climate control, whereby a computer is used to maintain
the temperature inside the car at a setting chosen by the user. Imagine that a
simple version of climate control is to be introduced to a particular model of car. It will be computer-controlled and will operate as Case 1 .

Two byte will be used to hold the representation of the patterns that will be
displayed on the two 7-segment displays, one pattern for each 7-segment display.Using the scheme introduced in Section 9 of Block 1, and in particular Figure 21, what pattern must be held in each of these bytes when the desired temperature
is 23 degree celsius?

回答 (1)

2013-06-05 10:10 am
✔ 最佳答案
呢個並唔係computer guru可答,而係有電腦底,又識組合語(或者有留意乜係2進數),又有少少電子底先識答!
第一件事你要明係個電腦會用兩個byte,即係兩個8bit數,去推個兩粒7畫管亮起,而人會看得明的數字。這個和平時用二進數的0000,0001,0010係完全不同,因為7-segment管對binary係無關係的,只係人為的pattern。
首先第一件事你要了解係正邏輯定負邏輯,即係0係亮,定係1會亮。十分重要!你可能會諗點會無啦啦用負邏輯,人腦梗係定1會亮,但徧徧因ttl關係,世上好多電子野用負邏輯。
第二件事係電腦存的byte,八個bit的對應到7-segment的那一劃。
書本中,小數點用bit0,即係二進 00000000和00000001 會令那一點亮或不亮。
而七字最頂一劃用bit7,即係二進 10000000和00000000 會控制亮或不亮。
正常寫法係一個表去查一查。總共0-09就可以。
例如要顯示如1,即係bit2及bit5要亮,正邏輯就係0010 00100,負邏輯就係 1101 1011。
如要顯示如2,即係bits 7,5,4,3,1要亮,自行諗一諗 二進數為何。
後記:binary的bits對應7-segment管那一劃係電子連線定義,並無標準。即係一點唔係一定係bit0!全部人為。


收錄日期: 2021-04-26 11:34:04
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20130604000051KK00285

檢視 Wayback Machine 備份