Created
March 22, 2017 08:09
-
-
Save stuxcrystal/e0c2117383f7c247ff747aa5bb540548 to your computer and use it in GitHub Desktop.
Umrechnungen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Umrechnung" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## 1. Bit zu Byte\n", | |
"In einem Bit sind 8 Byte" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"1.25" | |
] | |
}, | |
"execution_count": 12, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"inp_GBitps = 10 # GBit/s\n", | |
"inp_GBps = inp_GBitps/8\n", | |
"inp_GBps" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## 2. Präfixe umrechnen" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"code_folding": [] | |
}, | |
"source": [ | |
"Hier die Präfixtabelle\n", | |
"\n", | |
"<table>\n", | |
" <thead>\n", | |
" <tr><th>Präfix (SI)</th><th>Potenz bei (SI)</th><th>Potenz (Zweierpot.)</th><th>Präfix (Zweierpot.)</th></tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr><td>*G*</td><td>10<sup>9</sup></td><td>2<sup>30</sup></td><td>*Gi*</td></tr>\n", | |
" <tr><td>*M*</td><td>10<sup>6</sup></td><td>2<sup>20</sup></td><td>*Mi*</td></tr>\n", | |
" <tr><td>*K*</td><td>10<sup>3</sup></td><td>2<sup>10</sup></td><td>*Ki*</td></tr>\n", | |
" </tbody>\n", | |
"</table>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Um in die Grundeinheit umzurechnen Multiplizierst du es mit der Potenz." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"1250000000.0" | |
] | |
}, | |
"execution_count": 9, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"inp_Bps = inp_GBps * (10**9)\n", | |
"inp_Bps" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Und konvertierst es durch Division in das Zielpräfix" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"1192.0928955078125" | |
] | |
}, | |
"execution_count": 11, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"inp_MiBps = inp_Bps / (2**20)\n", | |
"inp_MiBps" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.0" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment