# How to effectively keep the MAC address as int64?

**URL:** https://discourse.julialang.org/t/how-to-effectively-keep-the-mac-address-as-int64/1965
**Category:** General Usage
**Created:** [February 7, 2017, 7:52pm UTC](https://discourse.julialang.org/t/how-to-effectively-keep-the-mac-address-as-int64/1965 "2017-02-07T19:52:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)
#### Post date: [February 7, 2017, 7:52pm UTC](https://discourse.julialang.org/t/how-to-effectively-keep-the-mac-address-as-int64/1965/1 "2017-02-07T19:52:16Z")

</div>

How to effectively keep the MAC address as int64 not as a string ? A have a lot of strings … are to hevy .  
Paul

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [February 7, 2017, 8:16pm UTC](https://discourse.julialang.org/t/how-to-effectively-keep-the-mac-address-as-int64/1965/2 "2017-02-07T20:16:11Z")

</div>

Maybe :

```julia
julia> parse(Int, "001b44113ab7", 16)
117106096823

julia> base(16, 117106096823, 12)
"001b44113ab7"

```

---

<div class="post-metadata">

### Author: ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)
#### Post date: [February 9, 2017, 8:09pm UTC](https://discourse.julialang.org/t/how-to-effectively-keep-the-mac-address-as-int64/1965/3 "2017-02-09T20:09:56Z")

</div>

THX. Nice and simpy, only UPPER CASE and lowercase are changed. Some sugestion ?

julia\> parse(Int, “E58329B3EAC4”, 16)  
252351503133380

julia\> base(16, 252351503133380, 12)  
“e58329b3eac4”

julia\> parse(Int, “000102d8dff5”, 16)  
4342734837

julia\> base(16, 4342734837, 12)  
“000102d8dff5”

Paul

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [February 9, 2017, 9:14pm UTC](https://discourse.julialang.org/t/how-to-effectively-keep-the-mac-address-as-int64/1965/4 "2017-02-09T21:14:42Z")

</div>

```julia
julia> uppercase(base(16, 252351503133380, 12))
"E58329B3EAC4"

```
