# 什麼是類比、什麼是數位？

## 類比 Analog

簡單地說，連續性資料訊號，就叫做類比，生活中的資料，其實大部份都是屬於這種，聲音的聲波也是。最常見的例子，就是下面這個水銀溫度計：

![](https://3758851535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMo8PFR2UvTkWwSK8m0%2F-LMoB8lu8j0mRuKm_tLj%2F-LMoC-DJUkWKn_Wtid8P%2Fcelsius-2125_1280.jpg?alt=media\&token=f2b9dcc9-a145-42f2-98b6-552f5b0c6d94)

下面這張圖形，則是聲波的例子：

![](https://3758851535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMo8PFR2UvTkWwSK8m0%2F-LMoB8lu8j0mRuKm_tLj%2F-LMoDdzoqht5hxA182Af%2Faudio-2028515_640.png?alt=media\&token=3ab03573-71af-40f3-ae56-c8ae3f08c9e5)

## 數位 Digital

簡單地說，可以使用明確的數字顯示出來的資料，就是數位資料。同上面的例子，下面這個溫度計就是數位式的：

![](https://3758851535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMo8PFR2UvTkWwSK8m0%2F-LMoB8lu8j0mRuKm_tLj%2F-LMoD8462uxyawzWPPoB%2Fweather-station-572856_640.jpg?alt=media\&token=cf6ed147-6ddb-4fc7-8c8a-5444398f7346)

## 類比和數位之間的轉換 Analog to Digital, Digital to Analog

同學們可以想想看，在上述的幾個例子中，何者比較方便儲存以及傳輸給他人重用的？

不用說，一定是數字比較方便儲存和傳輸給他人，對吧！那麼，當我們面對類比資料的時候，如果能夠把它轉換成一堆數字，就可以很方便地儲存起來，當需要這些資料的時候，只要把這些數字再轉換成原有的圖形就可以了。我們以下面這個例子說明：

![](https://3758851535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMo8PFR2UvTkWwSK8m0%2F-LMoaO5f1hVcl_PipLuh%2F-LModZZS7FhlrkrWt-P5%2F%E4%B8%8B%E8%BC%89.png?alt=media\&token=64881e70-f796-4529-bbbb-4f03c82f0e08)

轉換的品質取決於兩個因素，其一是取樣頻率（Sampling Rate），而另外一個因素則是解析度（Resolution），因此，有時候你會在一些音響說明文件或是外觀中看到KHz和bit這兩個單位，前者就是取樣頻率的單位，而後者則是解析度的單位。

取樣頻率的意思，就是隨著時間的變化，每秒鐘要去測量這個訊號目前值多少次，次數愈多，以後要再轉換回來的時候就愈精確。而量測到的數值要用多大的量來儲存，就牽涉到我們打算要用多精密的尺度來記錄。也就是在 Y 軸的部份，我們把把它們總共切成幾格呢？格子愈多就愈細緻，但是帶來的結果就是要用更大的記憶體去儲存它！

但是以下這些裝置就不需要進行這樣的轉換：

![](https://3758851535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMo8PFR2UvTkWwSK8m0%2F-LMoaO5f1hVcl_PipLuh%2F-LMofvzP2m2-nx1Yp8Ky%2Fcassette-40267_640.png?alt=media\&token=a91993ca-b2d8-4bf5-a309-e98520c33af3)

![](https://3758851535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMo8PFR2UvTkWwSK8m0%2F-LMoaO5f1hVcl_PipLuh%2F-LMofyiy6kUuJqaYhsoh%2Frecord-player-3663725_640.jpg?alt=media\&token=75675873-9920-494e-9a8c-a4e6da5777af)

{% hint style="info" %}

> 那數值要以什麼型式記錄到電腦中呢？答案是二進位，為什麼呢？
> {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nkust.gitbook.io/csx/untitled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
