將八進制數制轉換為二進制,十進制和十六進制數制

1)將八進制數制轉換為二進制數制 (1) Conversion of Octal Number System to Binary Number System)

To convert octal numbers into binary numbers, we can use the relationship between octal and binary numbers.

要將八進制數轉換為二進制數,我們可以使用八進制數和二進制數之間的關系。

Octal NumberBinary Number
0000
1001
2010
3011
4100
5101
6110
7111
八進制數 二進制數
0 000
1個 001
2 010
3 011
4 100
5 101
6 110
7 111

Example 1: Convert (73.2)8 into ( ? )2

示例1:將(73.2) 8轉換為(?) 2

Solution:

解:

Using the table provided above, we can replace octal numbers with their equivalent binary digits.

使用上面提供的表,我們可以將八進制數字替換為其等效的二進制數字。

    7 = 111
3 = 011
2 = 010

Therefore, (73.2)8 = (111 011.010)2

因此, (73.2) 8 =(111 011.010) 2

Example 2: Convert (475.62)8 into ( ? )2

示例2:將(475.62) 8轉換為(?) 2

Solution:

解:

Using the table provided above, we can replace octal numbers with their equivalent binary digits.

使用上面提供的表,我們可以將八進制數字替換為其等效的二進制數字。

    4 = 100
7 = 111
5 = 101
6 = 110
2 = 010

Therefore, (475.62)8 = (100 111 101.110 010)2

因此, (475.62) 8 =(100111 101.110 010) 2

2)將八進制數制轉換為十進制數制 (2) Conversion of Octal Number System to Decimal Number System)

Conversion of octal number into a decimal number can be done using the positional weights by multiplying the positional weights with the corresponding bit and add them all together to obtain the decimal number.

可以使用位置權重將八進制數轉換為十進制數,方法是將位置權重乘以相應的位,然后將它們全部加在一起以獲得十進制數。

  • In an integral part of the octal number, the weights follow the pattern as 80, 81, 82, 83, 84, 85 and so on from right to left.

    在八進制數的一個組成部分,權重按照圖案作為8 0,8 1,8 2,8 3,8 4,8 5等從右到左。

  • In the fractional part of the octal number, the weights follow the pattern as 8-1, 8-2, 8-3, 8-4, 8-5 and so on from left to right.

    在八進制數的小數部分,權重按照圖案作為8 -1,8 -2,-3 8,8 -4,-5 8等從左到右。

Example 1: Convert (75.3)8 = ( ? )10

示例1:轉換(75.3) 8 =(?) 10

Solution:

解:

octoal to decimal conversion (example 1)

We multiply each bit with the corresponding positional weight and then add them together to get the result.

我們將每個位乘以相應的位置權重,然后將它們加在一起以獲得結果。

Therefore, (75.3)8 = (61.375)10

因此, (75.3) 8 =(61.375) 10

Example 2: Convert (624.712)8 = ( ? )10

示例2:轉換(624.712) 8 =(?) 10

Solution:

解:

octoal to decimal conversion (example 2)

We multiply each bit with the corresponding positional weight and then add them together to get the result.

我們將每個位乘以相應的位置權重,然后將它們加在一起以獲得結果。

Therefore, (624.712)8 = (404.894)10

因此, (624.712) 8 =(404.894) 10

Example 3: Convert (482.31)8 = ( ? )10

示例3:轉換(482.31) 8 =(?) 10

Solution:

解:

Given number (482.31)8 is not an octal number as a range of octal number is from 0 to 7 and the given number includes 8. So, it cannot be converted to a decimal number.

給定數字(482.31) 8不是八進制數字,因為八進制數字的范圍是從0到7,并且給定數字包括8。因此,不能將其轉換為十進制數字

3)將八進制數制轉換為十六進制數制 (3) Conversion of Octal Number System into Hexadecimal Number System)

Conversion of the octal number to hexadecimal can only be done using a certain definite path. We first have to convert octal number to binary number and then convert the binary number into hexadecimal number i.e., Octal Number → Binary Number → Hexadecimal Number

八進制數到十六進制的轉換只能使用某個確定的路徑來完成。 我們首先必須將八進制數轉換為二進制數,然后將二進制數轉換為十六進制數,即八進制數→二進制數→十六進制數

Example 1: Convert (35.7)8 into ( ? )16

示例1:將(35.7) 8轉換為(?) 16

Solution:

解:

Step 1: Convert octal number to binary number.
Therefore, (35.7)8 = (011101.111)2

步驟1:將八進制數轉換為二進制數。
因此, (35.7) 8 =(011101.111) 2

Step 2: Convert binary number to a hexadecimal number.
Therefore, (011101.111)2 = (1D.E)16

步驟2:將二進制數轉換為十六進制數。
因此, (011101.111) 2 =(1D.E) 16

Therefore, (35.7)8 = (1D.E)16

因此, (35.7) 8 =(1D.E) 16

Note: To know how to convert the binary number into a hexadecimal number?, Read: Conversion of binary number into a hexadecimal number.

注意:要知道如何將二進制數轉換為十六進制數,請閱讀: 將二進制數轉換為十六進制數 。

Example 2: Convert (73.2)8 into ( ? )16

示例2:將(73.2) 8轉換為(?) 16

Solution:

解:

Step 1: Convert octal number to binary number.
Therefore, (73.2)8 = (111011.010)2

步驟1:將八進制數轉換為二進制數。
因此, (73.2) 8 =(111011.010) 2

Step 2: Convert binary number to a hexadecimal number.
Therefore, (111011.010)2 = (3B.4)16

步驟2:將二進制數轉換為十六進制數。
因此, (111011.010) 2 =(3B.4) 16

Therefore, (73.2)8 = (3B.4)16

因此, (73.2) 8 =(3B.4) 16

翻譯自: https://www.includehelp.com/basics/conversion-of-octal-number-system-to-binary-decimal-and-hexadecimal-number-systems.aspx

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/540471.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/540471.shtml
英文地址,請注明出處:http://en.pswp.cn/news/540471.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

[轉載] Python的生成器

參考鏈接: Python中的生成器Generator Python的生成器 什么是生成器 創建python迭代器的過程雖然強大,但是很多時候使用不方便。生成器是一個簡單的方式來完成迭代。簡單來說,Python的生成器是一個返回可以迭代對象的函數。 怎樣創建生…

想提高用戶訪問的響應速度和成功率還不趕快學習CDN

2019獨角獸企業重金招聘Python工程師標準>>> 課程介紹 CDN可以將源站內容分發至最接近用戶的節點,使用戶可就近取得所需內容,提高用戶訪問的響應速度和成功率。解決因分布、帶寬、服務器性能帶來的訪問延遲問題,適用于站點加速、點…

[轉載] python迭代器、生成器和裝飾器

參考鏈接: 有效地在Python中使用迭代 文章目錄 生成器生成器表達式(generator expression)通過使用yield關鍵字定義生成器并行前戲高潮 迭代器迭代器概述iter()函數 創建迭代器創建一個迭代器(類)內置迭代器工具count無限迭代器cycle 無限迭代器,從一個…

java中的starts_Java Math類靜態double nextAfter(double starts,double direction)示例

java中的starts數學類靜態double nextAfter(雙向啟動,雙向) (Math Class static double nextAfter(double starts , double directions) ) This method is available in java.lang package. 此方法在java.lang包中可用。 This method is used to return the double …

Python 核心編程(第二版)——條件和循環

Python 中的 if 子句由三部分組成: 關鍵字本身,用于判斷結果真假的條件表達式, 以及當表達式為真或者非零時執行的代碼塊。if 語句的語法如下: if expression: expr_true_suite 單個 if 語句可以通過使用布爾操作符 and , or 和 not實現多重判斷條件或…

[轉載] 【python魔術方法】迭代器(__iter__和__next__)

參考鏈接: Python __iter __()和__next __()| 將對象轉換為迭代器 文章目錄 __iter__ 和 __next__真正的迭代器總結 python里面有很多的以__開始和結尾的函數,利用它們可以完成很多復雜的邏輯代碼,而且提高了代碼的簡潔性,本文主…

Silverlight 異步單元測試

Silverlight 中的很多操作都是異步的,很多情況下要求單元測試也是異步的,但是介紹異步單元測試的文檔很少。通過對 Silverlight Toolkit 中的 Microsoft.Silverlight.Testing 和 Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight 這兩個文件…

網絡拓撲 令牌環網 以太網_以太網連接中網絡拓撲的類型及其框架 以太網技術...

網絡拓撲 令牌環網 以太網A topology explains how physically the network is designed or what is the structure of the network. These designs are both physical and logical. There are many network topologies 4 like Bus, Star, Ring, and Mesh. But only two types …

Wafer晶圓封裝工藝介紹

芯片封裝的目的(The purpose of chip packaging): 芯片上的IC管芯被切割以進行管芯間連接,通過引線鍵合連接外部引腳,然后進行成型,以保護電子封裝器件免受環境污染(水分、溫度、污染物等)&…

[轉載] Python中的解析式和生成器表達式

參考鏈接: Python | 生成器表達式 解析式和生成器表達式 列表解析List Comprehension 語法 [返回值 for 元素 in 可迭代對象 if 條件]使用中括號[],內部是for循環,if條件語句可選,會返回一個新的列表 列表解析試優點 編譯器會優化&…

java 數字字母進位_使用帶有進位的8085微處理器將兩個8位數字相乘

java 數字字母進位Problem statement: 問題陳述: Multiplication of two 8 bits numbers using 8085 microprocessor with carry. 使用帶有進位的8085微處理器將兩個8位數字相乘。 Algorithm: 算法: Load HL pair with initial data using LHLD comma…

[轉載] Python3.0中普通方法、類方法和靜態方法的比較

參考鏈接: Python中的類方法與靜態方法 一、語法區別 剛接觸Python中的面向對象,對于類方法和靜態方法難以區分,通過查找知乎、CSDN論壇,廢了好大的勁思路才逐漸明朗,所以就總結順便分享一下。 首先開始編輯代碼 # 普…

iOS:個人淺談工廠模式

一、什么是工廠方法? 正式的解釋是:在基類中定義創建對象的一個接口,讓子類決定實例化哪個類。工廠方法讓一個類的實例化延遲到子類中進行。工廠方法要解決的問題是對象的創建時機,它提供了一種擴展的策略,很好地符合了…

scanf 輸入十六進制_使用C語言中的scanf()在字符變量中輸入十進制,八進制和十六進制值...

scanf 輸入十六進制Here, we will declare an unsigned char variable and input different formats value like decimal format, octal format and hexadecimal format. 在這里,我們將聲明一個無符號的char變量,并輸入不同格式的值,例如十進…

[轉載] Python中pass的作用

參考鏈接: 如何在Python中編寫空函數?請使用 pass語句 空語句 do nothing保證格式完整保證語義完整 以if語句為例,在c或c/java中: if(true) ; //do nothing else { //do something } 對應于python就要這樣寫&#xff…

wrf 嵌套網格作用_在網格系統中使用響應列,嵌套列和偏移列 引導程序

wrf 嵌套網格作用介紹 (Introduction) In the previous article, we have learnt what is grid and grid system and how it works? Now, we will learn about how Responsive column, Nesting Columns and Offset Columns works and how to use them? If you have any doubt…

[看書筆記]《深入java虛擬機》——java體系結構(二)

java虛擬機的三種含義: - 抽象的規范 - 一個具體的實現 - 一個運行中的虛擬機實例 ---------------------java虛擬機的生命周期: java虛擬機實例的天職就是負責運行一個java程序。 啟動一個java程序,一個虛擬機實例誕生了;程序關閉…

[轉載] 【零基礎學爬蟲】python中的yield詳解

參考鏈接: 什么時候在Python中使用yield而不是return python中的yield功能比較強大,什么意思呢?如果一個函數f內使用了yield關鍵詞,那么該函數就可以這樣使用: for item in f(***): **** 也就是包含yield關鍵詞的函…

全新的membership框架Asp.net Identity(1)——.Net membership的歷史

在Asp.net上,微軟的membershop框架經歷了Asp.net membership到Asp.net simple membership,再到現在的Asp.net Identity. 每一次改變,都使得驗證框架更加的適應變化和可定制。這篇文章是Asp.net Identity系列的開篇,主要就membersh…

c語言100位整數變量聲明_C ++程序動態聲明一個整數變量并打印其內存地址

c語言100位整數變量聲明Here, we will learn how we can declare an integer variable dynamically and how to print address of declared memory block? 在這里,我們將學習如何動態聲明整數變量,以及如何打印聲明的內存塊的地址? In C pr…