IMOK
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- type: slide --- ## 計算機概論Lab-2 ### Combinational logic design ![image](https://hackmd.io/_uploads/SyYOA_ppA.png) <p>https://hackmd.io/@IMOK/Lab2<p> --- <img src="https://hackmd.io/_uploads/ryUSIqnJT.jpg" width=400 style="border-radius:1000px;"/> 講師: 賴昱有 --- ## 作業網站 http://140.121.197.13/tutorial --- ## Introduction + <font size=6>轉化logic expression為sum-of-products expression(SOP)</font> + <font size=6>使用布林代數(Boolean algebra)及卡諾圖(Karnaugh map)簡化SOP並設計邏輯電路(logic circuit)</font> --- ## Sum-of-products Form <font size=5>由2個或多個and(以 * 號表示)組合而成的項透過or(以+號表示)連結而成 </font> <img src="https://hackmd.io/_uploads/SJ-lJ731p.png" width= 300px/> <img src="https://hackmd.io/_uploads/rJwxJQh1T.png" width= 300px/> <font size=5>注意! ![](https://hackmd.io/_uploads/rk2_gXhJp.png)是不一樣的</font> ---- ## Product-of-sums Form <font size=5>由2個或多個or(以 + 號表示)組合而成的項透過and(以*號表示)連結而成 </font> ![](https://hackmd.io/_uploads/Hy5PEQnkp.png) ![](https://hackmd.io/_uploads/H1uOE7nJp.png) <font size=4>※化成標準形式的好處 標準形式布林函數屬於「雙階層執行電路」,即只經過兩層,如此可統一邏輯閘延遲時間。</font> --- ## Simplifying Logic Circuits <font size=5>許多logic circuit在最初設計的時候過於複雜<br>簡化和最佳化數位邏輯電路<br>可以減少電路的複雜性、降低功耗、提高性能和可靠性(減少耗費的電晶體)。</font> <font size=5>※使用真值表可以檢驗是否為等效電路</font> ---- <img src= "https://hackmd.io/_uploads/HJoRxS2ya.png" style="float : left ;margin : 100px 0px 0px 100px"/> <font size=5 float = right> | A | B | C | F | | --- | --- | --- | --- | | 0 | 0 | 0 | 0 | | 0 | 0 | 1 | 0 | | 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 0 | | 1 | 0 | 0 | 1 | | 1 | 0 | 1 | 1 | | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | </font> <img src= "https://hackmd.io/_uploads/SyMcs72Ja.png"/> ---- <img src= "https://hackmd.io/_uploads/B1T88SnJT.png" style="float : left ;margin : 100px 0px 0px 100px"/> <font size=5 float = right> | A | B | C | F | | --- | --- | --- | --- | | 0 | 0 | 0 | 0 | | 0 | 0 | 1 | 0 | | 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 0 | | 1 | 0 | 0 | 1 | | 1 | 0 | 1 | 1 | | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | </font> <img src= "https://hackmd.io/_uploads/HyncsXhya.png"> ---- ### algebraic simplification method <font size=4>最直接的方式為使用德摩根定律(DeMorgan's Laws)、分配律(Distributive Law)等..進行代數化簡</font> <font size=4 >※補充:須注意XOR及XNOR的展開比較特別</font> ![](https://hackmd.io/_uploads/Byt9jS2kp.png) ![](https://hackmd.io/_uploads/SJWd3rnJT.png) <font size=5>缺點: 無法輕易判斷是否為最簡表達式</font> ---- ## DeMorgan’s law <font size=4> 第一定律(AND的德摩根定律):對於任意兩個布林表達式A和B,其AND運算(與運算)的德摩根定律可以表述為: ¬(A ∧ B) = (¬A) ∨ (¬B) 第二定律(OR的德摩根定律):對於任意兩個布林表達式A和B,其OR運算(或運算)的德摩根定律可以表述為: ¬(A ∨ B) = (¬A) ∧ (¬B) </font> --- #### Designing Combinational Logic Circuits <font size=4>設計組合邏輯電路最簡單的方法是使用真值表。</font> <font size=4> + 程序如下: 1. Set up the truth table. 2. Write the AND term for each case where the output is a 1. 3. Write the sum-of-products expression for the output. 4. Simplify the output expression. 5. Implement the circuit for the final expression. </font> ---- ![](https://hackmd.io/_uploads/HkBAJ8hkp.png) ↓ ![](https://hackmd.io/_uploads/HJOyeI3k6.png) ↓ ![](https://hackmd.io/_uploads/B1EGlU3ka.png) --- ### Karnaugh Map Method(K-Map) <font size=4> 由貝爾實驗室的工程師 莫里斯.卡諾 發明的。 卡諾圖的圖形化表示方式,可以有效的將原始的布林判斷進行化簡。<br>缺點:當變數增加,其真值表行列數也會依照 2^n 急遽增加,導致圖形更加複雜化 <br>因此當變數大於6個時使用K-map會不易執行會選擇使用Quinn McCluskey </font> ---- #### 每個格子(cell)內所代表的即為一個minterm ![](https://hackmd.io/_uploads/rJwUcL2ka.png) ---- ![](https://hackmd.io/_uploads/H1KQa8216.png) ![](https://hackmd.io/_uploads/H1IeaInya.png) ---- ## Karnaugh Map Rule <font size=4>1. Groupings can contain only 1s; no 0s.(翻譯:只能圈選minterm為1的cell)</font> <font size=4>2. Groups can be formed only at right angles; diagonal groups are not allowed.(翻譯:不可以斜的)</font> <font size=4>3. The number of 1s in a group must be a power of 2-even if it contains a single 1.<br>(翻譯:每個組要圈選到2的x次方個cell)</font> <font size=4>4. The groups must be made as large as possible.(翻譯:越大越好)</font> <font size=4>5. Groups can overlap and wrap around the sides of the Karnaugh map.(翻譯:可以跨過邊界)</font> <font size=5> ※圈選後將各組互補的變數消去留下沒有互補的變數即為所求(化簡後的布林代數式) </font> ---- ![](https://hackmd.io/_uploads/ryBd-P31T.png) ![](https://hackmd.io/_uploads/SJIsbD3kT.png) ↓ ![](https://hackmd.io/_uploads/B1NY-D3kT.png) ↓ ![](https://hackmd.io/_uploads/BJI2ZP2Jp.png) ---- ![](https://hackmd.io/_uploads/Sy07fwhya.png) <img src="https://hackmd.io/_uploads/Hy0zMvhyT.png" style="float:left;"/><img src="https://hackmd.io/_uploads/BJRNzP3k6.png" style="float:left;"/> <br> <br> <img src="https://hackmd.io/_uploads/SyLLMDhkp.png"/> --- ## Lab Questions <font size=5>For the questions below, please write down the Boolean functions,truth tables,<br> the simplification method and process, and the final circuit using LogicCircuit. </font> ---- ## Question 1 <img src="https://hackmd.io/_uploads/HJKtu80aC.png"/> ## Question 2 <img src="https://hackmd.io/_uploads/HJfhdLA60.png"/> ## Question 3 <img src="https://hackmd.io/_uploads/Skr6O806C.png"/> ---- ## Question 4 <font size=5>Design a logic circuit which implements a majority voter.<br> There are 3 people A, B, and C. <br>If 2 out of the three people votes for an yes, i.e., a logic 1, then the output is 1.<br> Otherwise, output 0.</font> ---- ## Question 5 <font size=5>Design a logic circuit that is to produce a 1 or HIGH <br>output when the voltage is greater than 6V.<br>(represented by a four-bit binary number ABCD) </font>

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully