College
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
        • 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
          • Owners
          • Signed-in users
          • Everyone
          Owners Signed-in users Everyone
        • Write
          • Owners
          • Signed-in users
          • Everyone
          Owners 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 No publishing access yet

        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.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        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
      • 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 Help
    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
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners 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 No publishing access yet

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    # Class note ## 11.10 : class note ###### tags: `Digital system` ### (一) . 加法器 1. 法一 : 再一次卡諾圖化簡。 2. 法二 : 用兩個半加器。 3. 概念 : 多個變數的出入,可以用多個全加器實作。 - 例 : 兩個4bit相加。 - ripple carry加法器。 - 因為delay的存在,所以一開始的輸出的不正確,要等到前一級正確後,才會輸出正確的。 - $n$個bit的相加,要等$2^n$個加法器的delay。 ![](https://i.imgur.com/7E6M4uH.png) 4. Carry propagation - 雖然exclusive-or的延遲最長,但因為可以於有輸入的時候就加入,因此,比進位的延遲來說較短。 - 對每一位的進位,都有兩個邏輯閘(進位)的延遲。 5. 改良 : Carry lookahead - 方法 : 直接爆開,形成全部的輸出與當剛開始的input有關。 ### (二) . 加減器 1. 用sign的方式表示 : 遇到減的時候,直接轉乘二補數相加。 - 因為在正的時候,sign和1補數、2補數的表示是一樣的。 - 減的時候,再取負的表示式,就變成2補數的相加減。 ### (三) . BCD的加法器 1. 由code的相對辨別可以知道 : - 小於9下 : 同為2進位。 - 大於9下 : 答案是2近加6。 2. 電路 : 加減後,在辨別答案是否大於9,是的話進入加法電路。 ![](https://i.imgur.com/pWh4fjP.png) 3. 辨別電路 : 輸入後,輸出為C,0為小於9 ![](https://i.imgur.com/WF06Q0s.png) ### (四) . 乘法器 1. 二進位邏輯 : $A*B$ 就是 $A and B$。 2. 2bit相乘 : 只有最後一位需要考慮進位問題。 ![](https://i.imgur.com/oHgKTo7.png) ### (五) . 相等器 1. 設計邏輯 - 相等 : - $A1A2A3A4$ 和 $B1B2B3B4$ 時, - 要$A1=B1$且$A2=B2$且$A3=B3$且$A4=B4$。 - 設$Xi=AiBi+Ai'Bi'$ : X為第i為是否相等。 - 因此,相等的話邏輯應該為第$Xo - Xi$都相等。 2. 設計邏輯 - 大於 : - 邏輯 : $(第一位大於)或(第一位相等且二位大於)或....$。 - 用直觀邏輯設計。 ![](https://i.imgur.com/lYc7AJo.png=300x900) ## 11.17 : class note ### (一) . Decoder 1. $n\ to \ m\ decoder$ : 將n轉乘m bit的工具 2. 真值表 : 用minterm 的sum of product的方式。 ![](https://i.imgur.com/wbALOMC.png) 4. enable : 決定解碼器要不要動作。 - 利用$and$ 或是 $or$ 的概念。 ![](https://i.imgur.com/FrnsJUy.png) ### (二) . Active low Decoder 1. Active low : 和一般的setting不一樣,是0的時候動,非1的時候。 ### (三) . 4對16的解碼 1. 法一 : 重新設計一個電路 2. 法二 : 分成兩個電路,分別enable、且一個是active low 一個是active high。 ### (四) . Decoder 1. decoder : 可以直接求出minterm的工具。 2. 可以用decoder去設計任何的電路 : - 用decoder求出minterm。 - 在將需要的minterm進行or。 - 非最精簡的電路, 3. 例子 : 一個全加器的最精簡電路需要兩次的k-map化簡。 - 需要兩個不同的input電路。 - 但其實可以用一個decoder去輸出minterm,在or需要的minterm。 ![](https://i.imgur.com/HH1dEpn.png) ![](https://i.imgur.com/1iFgOFQ.png) 4. $n-bit$ 為輸入的電路,可以用一個decoder和多個or,組成。 ### (五) . encoder 1. 限制 : 需要合法輸入,所以很多形況不用考慮。 - 需要一次輸處只有一個為一。 - 所以不合法的輸入,會導致不合法的輸出。 - 一個8轉回3的encoder,只有8種輸入可以考慮,其他為dont care。 ![](https://i.imgur.com/sypcQa1.png) 2. 解法 : 直觀邏輯,考慮『什麼輸入的時候會為1』。 ![](https://i.imgur.com/eUZqohW.png =450x) ### (六) . Priority Encoder 1. 解決encoder的不合法訊息。 2. 方法 : 看最高位元的 $bit$ ,最高位元以前的 $bit$ 都不要看。 - 其他condition 可以視為don't care。 ![](https://i.imgur.com/MTSFwa7.png =450x) ### (七) . 多工器 1. 選擇器 : 輸出不是 $i_0$ 就是 $i_1$。 ![](https://i.imgur.com/Sk5YgnG.png =400x) 2. 實作 : - 用and的特性和controller。 - enable接上一個not,對兩個and輸入相反的。 ![](https://i.imgur.com/x6V0ul5.png) 3. 4to1 選擇器 : 要有兩條的選擇線去選 ![](https://i.imgur.com/76cULCM.png) ## 11.23 Note ### (一) . Three-state gates 1. 定義 : 為0的時候,為高阻抗-斷路,1為導通。 ![](https://i.imgur.com/15djhwx.png) ### (二) . Bus 匯流排 1. 定義 : 共用線,不是每一個互相交錯接線,而是共用一條線。 ![](https://i.imgur.com/8K63ML6.png) ### (三) . Buffer 1. 功用 : 可以放大fan-out。 ### (四) . 優化 1. tool可以做的 : 轉換,優化。 - 可以自動補足fan-out。 3. tool不能做的 : 路徑決定。 ![](https://i.imgur.com/f6EmGoJ.png) ### ch5 : 循序電路 1. 有記憶功能的電路。 2. 有feeback line。 3. 就是之後顯示的狀態跟現在的狀態有關。 4. 例子 : 紅綠燈,紅燈後會變綠燈 。 5. flip-fops : 記憶單元。 6. 需要暫停等待記憶單元的運算結束之後。 - 如下圖,可以在正圓輸出訊號的間隔之間,作記憶體運算。 ![](https://i.imgur.com/UF0j5Yp.png =500x) ### 同步和非同步的循序電路 1. 同步定義 : 如上圖,在記憶體運算結束之後,才會有下一步的輸入。 - 有一個控制訊號,受到一個週期性的脈衝所控制。 3. 非同步定義(event-driver) : 一直在進行的電路。 4. clock pulses : 在一個電路的delay為一個週期送出enable。 ## 12.8 - class note ### (一) . 同步電路 ![](https://i.imgur.com/Een2yG8.png) ### (二) . Latch 1. 定義 : 記憶單元,記住1 bit的0或1。 - 記憶單元 : 有輸入後,不論何如讀取,都可以有一樣的輸出。 2. 電路圖 : - set : 輸入要記憶的bit。 - reset : $set'$。 - 要讀取的時候 : $set=0$、$reset=0$。 - 缺點 : 有不可以讀入的狀態,即$set=reset=1$時。 ![](https://i.imgur.com/oZvAMid.png) 3. 例一 : 原本是記住1,輸入0,0,讀取 - 原本是記住1。 - 輸入0,0,表示需要讀取, - 輸入後,仍為1,0。 ![](https://i.imgur.com/ZIwmUiu.png ) 4. 例二 : 原本是記住1,輸入0,1,改成記住0 - 原本是記住1。 - 輸入為0,1後。 - $Q$和$Q'$變成0, - 進而再改變feeback。 - $Q$和$Q'$再變成0,1。 ![](https://i.imgur.com/33RPrJZ.png) 5. 例三 : 輸入為1,1後,進入震盪狀態(一下是0,0;一下是0,1)。 ### (三) . trigger 1. Level triggered : 可能會有錯誤的結果,因為可能信號保持的時候,feeback回去造成錯誤輸出。 2. Edge triggered : 改良上例,讓存放的時間只在一瞬間。 ![](https://i.imgur.com/ydRtNF5.png) ### (四) . flip -fop 1. set - up time : 將clock輸入flip-fop前,data要先輸入所需要的delay time。 2. hold time : 將clock輸入後,input要維持的時間。 - 為了確保正常的輸出,需要同時保持clock和data維持需要的輸入。 - 所以不是輸入瞬間儲存單元就會被儲存,還需要等hold time。 ## 12.15 ### re-view 1. ```latch``` : 記憶方法為```level-trigger```。 2. ```flip-flops ``` : 記憶方法為```edge trggier```。 3. 實作```flip-flops``` : ```master-slave```,兩個D-latch結合。 ### (一) .latch 和flip-flop 1. latch : 整個峰波的時候,都會存放反應,所以,latch存放的為clock峰波結束的時候的值。 2. flip-flop : 存放的點只是一瞬間。 ### (二) . 基本名詞 1. ```clock period``` : 每一個正負波的週期。 - 單位 : 幾秒來一次週期波。(正負波不一定等長)。 - 頻率 : 週期的倒數。(每秒多少次) 2. ```duty cycle ``` : 正波與負波的比例。 3. delay只有相對,但沒有絕對。 4. ```cirtical path``` : 電路工作的最長路徑。 ### (三) . ```Clock Period ``` : 1. 電路中間的是flip-flop : 先阻擋錯誤的輸出。 2. 一個電路可以用記憶單元分成一個個模組。 3. 而整個電路的cirtial path為模組中最大的delay。 4. 而整個電路的delay為cirtical path再加入flip-flop的set-up hold time。 ## 12.22 - class note ### (一) . state diagram #### 兩個flip-flop : 可以記憶2bit的值 - 分成現在狀態、下一個狀態、輸出入。 ### (二) . Jk flip-flops 1. 比較 : - JK : 需要兩個記憶訊號去記憶data。 - D : 只需要一個記憶訊號去記憶data。 - 但Jk flip flops的好處是,k-map化簡比較方便(don't care很多)。 2. JK的特性 : ![](https://i.imgur.com/GiFOqtJ.png) 3. 分析方法 : - 先列出J和K的function。 - 再由J和K推出下一個state。 ### (三) . 設計電路 1. 步驟 : - 電路的規則 : 例如紅綠燈,必先紅色後綠色。 - 檢查狀態 : 可能可以減少需要的狀態,可能可以降低成本。 - 分配適當的二進位值。 - 得出state table。 - 選擇flip-flop。 - 化簡flip-flop的輸入等式。 2. 設計分配 : - 分成control unit 和datapath。 - 注意,bus只可以同時有一個輸入 3. Control Unit : - output logic : 根據現在的狀態,和控制狀態,算出需要的控制訊號。 - state register : 存放狀態的單元。 4. Mealy Machine 、 Moore Machine - Mealy Machine : 輸出和現在的狀態和input有關。 - Moore Machine : 輸出只和現在的狀態有關。 5. Control unit 的flip flop 和幾個狀態有關。 ### (四) . 實作電路 1. 用三個k-map 化簡。

    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
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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